UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WiqyoGvpb3CndTaXzZ7J+98q6V0wnM5XWHlvgpxjJ/E='
WHERE
key_id = 'be4db66f1277acc9ac1485d82fcfda8d79ff0335fa2a3b5e94afd962c299248b'
AND (
token = 'WiqyoGvpb3CndTaXzZ7J+98q6V0wnM5XWHlvgpxjJ/E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)