UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hKVoYvlOLu5J63E9yrbAZtFjDbZPd5GorWWMkOw9oPs='
WHERE
key_id = '5eff12086363be09cd769620ffbc69ef521108c66d84b0aaec9b2a6cd68732f2'
AND (
token = 'hKVoYvlOLu5J63E9yrbAZtFjDbZPd5GorWWMkOw9oPs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)