UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '76WvUguolASlB8mQ8tdBKKxaA7ntQKlpC/nPyh9/+40='
WHERE
key_id = 'cf4f2d62a60013adad667558bac8edef8d9da3656718c904aa865cf366285b21'
AND (
token = '76WvUguolASlB8mQ8tdBKKxaA7ntQKlpC/nPyh9/+40='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)