UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2VWC60bCztltacvu1TPxaozBdOlJVzDVW6rwq2Vylgk='
WHERE
key_id = '70088c2c987c88d7092a03ff99a3c036fef86f5c83766d41ef814032b62e1d1b'
AND (
token = '2VWC60bCztltacvu1TPxaozBdOlJVzDVW6rwq2Vylgk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)