UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'c2Mrjp89cxgs4pClyJaTVHOg6toKtHONAI5UNSQmQew='
WHERE
key_id = '88ce289edb4401cb2c9b65f679c8618ad45beeb35a8c3491f3592ad99c54fc20'
AND (
token = 'c2Mrjp89cxgs4pClyJaTVHOg6toKtHONAI5UNSQmQew='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)