UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'frzrKAMI5kxSNlm/KpA74np8KZS3HxVMoFnMsU1KErQ='
WHERE
key_id = '938b1fb626c44bc7a88437ade2199455940075901f0bdf5746f2537a6a173cf3'
AND (
token = 'frzrKAMI5kxSNlm/KpA74np8KZS3HxVMoFnMsU1KErQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)