UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9BG8HqORYBOCY6qOSRhyiPQp7aP0gv0a84szIQc++9c='
WHERE
key_id = '32ea11a3901e6837d2e95dcaf0344efd3b897ccfd171bdac10ca6d285f624a83'
AND (
token = '9BG8HqORYBOCY6qOSRhyiPQp7aP0gv0a84szIQc++9c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)