UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vhpMRMZUv3g4FtYdqo1rCdb9F+m1fLAgBgDUoAeFa/8='
WHERE
key_id = '97e3592e29f2f82ee5c6cdc8f23e3bcca366f4ddcec78ae9344251ccddf14a6a'
AND (
token = 'vhpMRMZUv3g4FtYdqo1rCdb9F+m1fLAgBgDUoAeFa/8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)