changed sql query to not include rows without longlived token