UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/cyHqHf38gNIFE4tXUTjq5eyikldtUo7SpbM+Aue2Ks=' 
WHERE 
  key_id = '225324fb3fe70f8895cbc8b0d9a0d50992600c172d7b29e9abf3be7e96bdf001' 
  AND (
    token = '/cyHqHf38gNIFE4tXUTjq5eyikldtUo7SpbM+Aue2Ks=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019