SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    5344, 5259, 5349, 5217, 5045, 5097, 5070, 
    8786, 5242, 5370, 5374, 5381, 5364, 
    5387, 8785, 5399, 5253, 5266, 8788, 
    5014, 5407, 5273, 4988, 5341, 5390, 
    5118, 4973, 4946, 4911, 5355, 5394, 
    5409, 5412, 5419, 5425
  )

Query time 0.00049

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "22.25"
    },
    "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": 53,
      "rows_produced_per_join": 53,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "11.65",
        "eval_cost": "10.60",
        "prefix_cost": "22.25",
        "data_read_per_join": "314K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`webmarco`.`cscart_categories`.`parent_id` in (5344,5259,5349,5217,5045,5097,5070,8786,5242,5370,5374,5381,5364,5387,8785,5399,5253,5266,8788,5014,5407,5273,4988,5341,5390,5118,4973,4946,4911,5355,5394,5409,5412,5419,5425))"
    }
  }
}

Result

category_id parent_id
4988 4973
5014 4973
5045 4973
5070 4973
5097 4973
5259 5253
5266 5253
5344 5341
5349 5341
5364 5341
5399 5341
5407 5341
5355 5349
5370 5364
5374 5364
5381 5364
5387 5364
5394 5364
5409 5407
5412 5407
5419 5407
5425 5407
5242 8785
8786 8785
8788 8785