SELECT 
  category_id, 
  parent_id 
FROM 
  q_categories 
WHERE 
  parent_id IN(
    257, 273, 278, 302, 361, 393, 544, 598
  )

Query time 0.00042

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "55.61"
    },
    "table": {
      "table_name": "q_categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 34,
      "rows_produced_per_join": 34,
      "filtered": "100.00",
      "index_condition": "(`portal`.`q_categories`.`parent_id` in (257,273,278,302,361,393,544,598))",
      "cost_info": {
        "read_cost": "48.81",
        "eval_cost": "6.80",
        "prefix_cost": "55.61",
        "data_read_per_join": "89K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ]
    }
  }
}

Result

category_id parent_id
258 257
264 257
510 257
511 257
274 273
275 273
276 273
277 273
279 278
284 278
288 278
289 278
290 278
291 278
303 302
330 302
362 361
363 361
364 361
365 361
391 361
392 361
545 544
546 544
547 544
548 544