UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HS1Z4cE23lM1Gp8NhkMC7dBpK0LXYkUWBnDhPgKo0so='
WHERE
key_id = 'ddb25eb222d39ab94b334ce8f12eecb2e9a920dfd101ec58e998882076081f5f'
AND (
token = 'HS1Z4cE23lM1Gp8NhkMC7dBpK0LXYkUWBnDhPgKo0so='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)