UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/gknobzrLiS0pNVYyafBQ/UPC7s/LvDgE3ENcFH9cpE='
WHERE
key_id = '9fc43d33fd0cd1e047f34a362c2998d90cc77bb1c4b9db37eea7c288bfadde9a'
AND (
token = '/gknobzrLiS0pNVYyafBQ/UPC7s/LvDgE3ENcFH9cpE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)