UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FLUJwCjs2syQTW5BWfsvMN4vIAlsLOPFpAhVpy6Z9hs='
WHERE
key_id = '1ab1eadad97f7e73d4059b584c904ac4fdbf5377b4d12d59fbe7b8b9c166b30b'
AND (
token = 'FLUJwCjs2syQTW5BWfsvMN4vIAlsLOPFpAhVpy6Z9hs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)