UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MGE4IPFPQij9fMoFNx5lnxQ47GjZhj0DwetfuuOlKjQ='
WHERE
key_id = '292fec10a11cacfadf36bc6f2ef2ecbaf10819cde9f4c53c5b5d537005b61b6a'
AND (
token = 'MGE4IPFPQij9fMoFNx5lnxQ47GjZhj0DwetfuuOlKjQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)