SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    5745, 5582, 6155, 5572, 5762, 5604, 6181, 
    6124, 5617, 6209, 5782, 6334, 5631, 
    6232, 5802, 5644, 6260, 5829, 5664, 
    5852, 6285, 5674, 5874, 6313, 5689, 
    5890, 5702, 5911, 5716, 5929, 5945, 
    5979, 5997, 9029
  )

Query time 0.00076

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "25.85"
    },
    "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": 62,
      "rows_produced_per_join": 62,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "13.45",
        "eval_cost": "12.40",
        "prefix_cost": "25.85",
        "data_read_per_join": "367K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`webmarco`.`cscart_categories`.`parent_id` in (5745,5582,6155,5572,5762,5604,6181,6124,5617,6209,5782,6334,5631,6232,5802,5644,6260,5829,5664,5852,6285,5674,5874,6313,5689,5890,5702,5911,5716,5929,5945,5979,5997,9029))"
    }
  }
}

Result

category_id parent_id
5582 5572
5604 5572
5617 5572
5631 5572
5644 5572
5664 5572
5674 5572
5689 5572
5702 5572
5716 5572
5945 5572
5979 5572
5997 5572
9029 5572
5745 5716
5762 5716
5782 5716
5802 5716
5829 5716
5852 5716
5874 5716
5890 5716
5911 5716
5929 5716
6155 6124
6181 6124
6209 6124
6232 6124
6260 6124
6285 6124
6313 6124