SELECT 
  category_id, 
  parent_id 
FROM 
  q_categories 
WHERE 
  parent_id IN(
    301, 7, 470, 407, 249, 408, 61, 264, 6, 
    257, 217, 567, 207, 248, 615, 406, 598, 
    484, 243, 469, 614
  )

Query time 0.00081

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "154.01"
    },
    "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": 95,
      "rows_produced_per_join": 95,
      "filtered": "100.00",
      "index_condition": "(`portal`.`q_categories`.`parent_id` in (301,7,470,407,249,408,61,264,6,257,217,567,207,248,615,406,598,484,243,469,614))",
      "cost_info": {
        "read_cost": "135.01",
        "eval_cost": "19.00",
        "prefix_cost": "154.01",
        "data_read_per_join": "250K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ]
    }
  }
}

Result

category_id parent_id
7 6
159 6
168 6
184 6
292 6
360 6
406 6
425 6
438 6
445 6
519 6
596 6
367 6
619 6
61 7
147 7
9 61
62 61
63 61
64 61
65 61
208 207
217 207
218 207
219 207
220 207
221 207
222 207
223 207
224 207
225 207
226 207
233 207
234 207
241 207
242 207
243 207
379 207
469 207
513 207
580 207
614 207
249 248
257 248
273 248
278 248
302 248
361 248
393 248
395 248
544 248
566 248
569 248
598 248
250 249
251 249
252 249
253 249
254 249
255 249
256 249
271 249
433 249
434 249
459 249
484 249
533 249
535 249
579 249
595 249
258 257
264 257
510 257
511 257
265 264
266 264
267 264
268 264
269 264
270 264
272 264
407 406
408 406
409 406
567 406
568 406
571 406
470 469
615 469
471 470
472 470
473 470
474 470
475 470