UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+fQXb/RjyNqq/EhvEo4TBdWxYXGQ7A4wXhSvqEi0R7k='
WHERE
key_id = '92c48e49a0ee2e290fd79e0ad961d6731248726b49651a5ec801ebc6037336ed'
AND (
token = '+fQXb/RjyNqq/EhvEo4TBdWxYXGQ7A4wXhSvqEi0R7k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)