UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Iq1ZS1bMQGdQz3KlAtNsAJKh0PQ/+wuiZ2xJ37NrDLw='
WHERE
key_id = '2a85b0e0aad91a7e286a2437fac6c85f98b0ccb5cb8dc3ce34d6521c7786d3eb'
AND (
token = 'Iq1ZS1bMQGdQz3KlAtNsAJKh0PQ/+wuiZ2xJ37NrDLw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)