UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iFg9tUWa6Yqu+p4zPFGGrjQnGvciipWKQdy6dVoA4oE=' 
WHERE 
  key_id = 'cbceb61df10efaa12bdcc87efb61c113f9ec74c11d310cbe6225aefeaa104384' 
  AND (
    token = 'iFg9tUWa6Yqu+p4zPFGGrjQnGvciipWKQdy6dVoA4oE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054