UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UmOYwkQSSMwxYn9MuU6lP6jDvl02JKYtfgnxqORdS7g='
WHERE
key_id = '35337ba2bddbd53f7b2d2a48f28bf55af9f6d57b19617d6170870f288552e6ad'
AND (
token = 'UmOYwkQSSMwxYn9MuU6lP6jDvl02JKYtfgnxqORdS7g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)