UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y6oD7hG6xCJXZjMhFeQ58UwdPT8iLdMnxXzUcRthz/A='
WHERE
key_id = 'abb124711ee2127c0806b6849000c2a9d9e7897ed42e1040cb1d7dcb99b05b37'
AND (
token = 'y6oD7hG6xCJXZjMhFeQ58UwdPT8iLdMnxXzUcRthz/A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)