SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    30572, 40166, 36105, 32211, 36152, 40167, 
    36151, 30965, 36154, 40148, 40153, 
    30966, 40215, 36157, 36089, 36147, 
    41434, 30575, 40155, 40152, 36123, 
    36059, 35809, 40798, 41055, 39202, 
    40503, 40500, 35083, 39847, 30571, 
    40193, 40502, 36076, 36102, 40498, 
    36150, 40177, 41432, 35775, 40779, 
    41139, 40782, 40794, 29492, 40780, 
    40783, 40795, 40781, 40784, 40796, 
    40797, 40785, 40786, 40787, 16340, 
    16343, 42614, 29493, 16362, 42575, 
    42577, 16374, 16494, 16210, 42611
  )

Query time 0.00058

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "19.88"
    },
    "table": {
      "table_name": "cscart_categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 98,
      "rows_produced_per_join": 98,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "10.08",
        "eval_cost": "9.80",
        "prefix_cost": "19.88",
        "data_read_per_join": "254K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`maniamall_cscart`.`cscart_categories`.`parent_id` in (30572,40166,36105,32211,36152,40167,36151,30965,36154,40148,40153,30966,40215,36157,36089,36147,41434,30575,40155,40152,36123,36059,35809,40798,41055,39202,40503,40500,35083,39847,30571,40193,40502,36076,36102,40498,36150,40177,41432,35775,40779,41139,40782,40794,29492,40780,40783,40795,40781,40784,40796,40797,40785,40786,40787,16340,16343,42614,29493,16362,42575,42577,16374,16494,16210,42611))"
    }
  }
}

Result

category_id parent_id
29492 16210
36150 16210
40148 16340
40153 16340
40167 16340
41139 16340
40782 16343
40783 16343
40784 16343
40785 16343
40786 16343
40787 16343
36089 29493
36147 29493
36157 29493
41434 29493
30966 30965
36151 30965
36152 30965
36154 30965
40779 30965
40780 30965
40781 30965
35809 35775
36059 35775
36076 35775
36105 35775
40166 35775
40177 35775
40498 35775
40500 35775
40502 35775
40503 35775
40794 35775
40795 35775
40796 35775
40797 35775
40798 35775