UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ooSZU5EOwYxT8hguPIG6ffeJ7XR0YsK+JB3Zz1nmv1M=' 
WHERE 
  key_id = '724db67534b878ed6ff92b06e7e433ebbf5fba8c6c6dcfb19ce79af9c7cc24e4' 
  AND (
    token = 'ooSZU5EOwYxT8hguPIG6ffeJ7XR0YsK+JB3Zz1nmv1M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025