UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nGJToIqhciOnWii1c2BvFiROkxaGKDZ+E7tUHAcF7iU='
WHERE
key_id = '70da77dd1dba437c217669a3f39c116be49c49b57b6c037b20d7fc0a00149dd9'
AND (
token = 'nGJToIqhciOnWii1c2BvFiROkxaGKDZ+E7tUHAcF7iU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)