UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2c6mGURne0y+/PEirzhrrJeuLXwH5VL55Y9XRPQhCzQ='
WHERE
key_id = 'eff8032d7a85c8e454b1cf13a0b853d030a572e17627e0a7e22bb5335885975c'
AND (
token = '2c6mGURne0y+/PEirzhrrJeuLXwH5VL55Y9XRPQhCzQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)