UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ITSIR6hwg9RPLrXJDX0zRRijkmpa2Ouh710eu7/GiJI=' 
WHERE 
  key_id = '8de9bb0ca47e91f2da642ee27f8f11200cd20af6127751f8af11c063e50fb52b' 
  AND (
    token = 'ITSIR6hwg9RPLrXJDX0zRRijkmpa2Ouh710eu7/GiJI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055