UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XJ5AkrnVQwrpFN3aGh6tpmEKEV7HyYB6WP6qdIUoM/E='
WHERE
key_id = '7d953b1d6431cba61b0dc54e9ec0f01bfe50b9c41d5b9d74f2b421c786c84184'
AND (
token = 'XJ5AkrnVQwrpFN3aGh6tpmEKEV7HyYB6WP6qdIUoM/E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)