UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'H35vFvvEzZl9c4UlnMu5lGJ0s2tgXo6b8mUcEIjO4yQ='
WHERE
key_id = '56dd38d83f582c5710dc269a93b3df71a0a2eb08fad1d95971a0fcd5f85405d6'
AND (
token = 'H35vFvvEzZl9c4UlnMu5lGJ0s2tgXo6b8mUcEIjO4yQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)