SELECT 
  category_id, 
  parent_id 
FROM 
  categories 
WHERE 
  parent_id IN(
    458, 461, 2796, 2795, 470, 472, 473, 462, 
    480, 482, 483, 484, 463, 476, 478, 465, 
    466, 467, 464, 706, 489, 586, 583, 584, 
    589, 592, 593, 21080, 17909, 591, 2206, 
    5964, 22070, 595, 15983, 596, 597, 599, 
    15606, 19199, 19200, 19201, 6959
  )

Query time 0.00084

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "15.07"
    },
    "table": {
      "table_name": "categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 72,
      "rows_produced_per_join": 72,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "7.87",
        "eval_cost": "7.20",
        "prefix_cost": "15.07",
        "data_read_per_join": "188K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`goimagine`.`categories`.`parent_id` in (458,461,2796,2795,470,472,473,462,480,482,483,484,463,476,478,465,466,467,464,706,489,586,583,584,589,592,593,21080,17909,591,2206,5964,22070,595,15983,596,597,599,15606,19199,19200,19201,6959))"
    }
  }
}

Result

category_id parent_id
461 458
462 458
463 458
464 458
465 458
706 458
470 461
471 461
472 461
473 461
616 461
2795 461
2796 461
480 462
482 462
483 462
484 462
476 463
478 463
466 465
467 465
583 489
584 489
586 489
590 589
591 589
592 589
593 589
2206 589
5964 589
17909 589
21080 589
22070 589
596 595
597 595
15983 595
19200 19199
19201 19199