UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'A9HQWCQmCrTu60J82OnTjjl5+rMhsjzpBWYYWSSAc/k='
WHERE
key_id = '42192bf7a91916545dc3e3a93c80820c6953d2f9c4913f8a95dbefd5c2e2694b'
AND (
token = 'A9HQWCQmCrTu60J82OnTjjl5+rMhsjzpBWYYWSSAc/k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)