UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8MtksMobciJjYTlRuFhKihtFoeLHiAzBCLMlHbNrzk8='
WHERE
key_id = 'a85da55e387fdb5d41533095b119e376173eb4e1879ecb9a73c934d4b63efb19'
AND (
token = '8MtksMobciJjYTlRuFhKihtFoeLHiAzBCLMlHbNrzk8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)