UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lGt7ct/6VMNessh1nMmVp9pe9frqeH8JVTAkv3i7Y6g='
WHERE
key_id = '91e560c88d62cff38ccf3e684e4898af6f00f6c8081ecb9d1b0bb9bce68bc1e6'
AND (
token = 'lGt7ct/6VMNessh1nMmVp9pe9frqeH8JVTAkv3i7Y6g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)