UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yQ7H978It4Ces2/hBwFffBmgKbMFvhBQ8txkzJVLHyg='
WHERE
key_id = 'cc7cb58404e88776559affbab59bf21c21a80b85e464d344ae863dc4ed6f4f79'
AND (
token = 'yQ7H978It4Ces2/hBwFffBmgKbMFvhBQ8txkzJVLHyg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)