UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MG26jFt6YNu7zUkH9p54HuNxqfqU8iLgiHBDFUPq7yc='
WHERE
key_id = '37e4e683e756077eeecb04ba657c368dcac0d068daf8b8d9a9ec05f1c47dae93'
AND (
token = 'MG26jFt6YNu7zUkH9p54HuNxqfqU8iLgiHBDFUPq7yc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)