UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NZYNiVuxsG/4DtKeap/TK4eBrMbD75qvT8wJxKqP0XE='
WHERE
key_id = '7224fcdec5fe7ca37fe134cacec1d7fcaa609ce2b2bcc98dd9a57801a51acd5c'
AND (
token = 'NZYNiVuxsG/4DtKeap/TK4eBrMbD75qvT8wJxKqP0XE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)