SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    4423, 
    4468, 
    9291, 
    4472, 
    10147, 
    10630, 
    4525, 
    4304, 
    4365, 
    10148, 
    9284, 
    4544, 
    4865, 
    4888, 
    5214, 
    4334, 
    9825, 
    10258, 
    4458, 
    9634, 
    4004, 
    4289, 
    4257, 
    4275, 
    4422, 
    9292, 
    9285, 
    4504, 
    4288, 
    9293, 
    5635, 
    5227, 
    5275, 
    4239, 
    4563, 
    4300, 
    4882, 
    4588, 
    4308, 
    5438, 
    4501, 
    4551, 
    5234, 
    5215, 
    5298, 
    4598, 
    5302, 
    4618, 
    5153, 
    5041, 
    4886, 
    4476, 
    5065, 
    4896, 
    4827, 
    5101, 
    4916, 
    4373, 
    5088, 
    4507, 
    5321, 
    5332, 
    4383, 
    4717, 
    4299, 
    5477, 
    5531, 
    4518, 
    4331, 
    4730, 
    5218, 
    4617, 
    4655, 
    5260, 
    4301, 
    5231, 
    5318, 
    4259, 
    5657, 
    4880, 
    4672, 
    4951, 
    5205, 
    5249, 
    5133, 
    5091, 
    4571, 
    4947, 
    4867, 
    4754, 
    5173, 
    5343, 
    5178, 
    4931, 
    5346, 
    4389, 
    5312, 
    4791, 
    4324, 
    4534, 
    5472, 
    4539, 
    5257, 
    5353, 
    4695, 
    4294, 
    4914, 
    4648, 
    5238, 
    4339, 
    4699, 
    4351, 
    4788, 
    4900, 
    4994, 
    5263, 
    5163, 
    4977, 
    5278, 
    4773, 
    5244, 
    5197, 
    5119, 
    5351, 
    5342, 
    4622, 
    5203, 
    4949, 
    5264, 
    5320, 
    4457, 
    4556, 
    4350, 
    5297, 
    5034, 
    4746, 
    5255, 
    4638, 
    4357, 
    4302, 
    4735, 
    4386, 
    4822, 
    4935, 
    5281, 
    4786, 
    5256, 
    5376, 
    5358, 
    5141, 
    4991, 
    4995, 
    4961, 
    4385, 
    4970, 
    4774, 
    5268, 
    4311, 
    4757, 
    4849, 
    4418, 
    4807, 
    5270, 
    5296, 
    5308, 
    5398, 
    5176, 
    5012, 
    4644, 
    5378, 
    4399, 
    5058, 
    5038, 
    4795, 
    4667, 
    4784, 
    5415, 
    4871, 
    5011, 
    5280, 
    4442, 
    4820, 
    5282, 
    5400, 
    5092, 
    5136, 
    4817, 
    5434, 
    5292, 
    5064, 
    4834, 
    4480, 
    4813, 
    5432, 
    5105, 
    5418, 
    4669, 
    5072, 
    4693, 
    4499, 
    4841, 
    5459, 
    5303, 
    4848, 
    4842, 
    5186, 
    5130, 
    5443, 
    4833, 
    5458, 
    5315, 
    4519, 
    4866, 
    5220, 
    9018, 
    4798, 
    4832, 
    4864, 
    4854, 
    4650, 
    4884, 
    4816, 
    5243, 
    4875, 
    4857, 
    5322, 
    4903, 
    4904, 
    4684, 
    5366, 
    7811, 
    4895, 
    4763, 
    9016, 
    4933, 
    5016, 
    4920, 
    5401, 
    4781, 
    5404, 
    4987, 
    4943, 
    10182, 
    9681, 
    5416, 
    10183, 
    5427, 
    5445, 
    5454, 
    5485, 
    10171, 
    4278, 
    5168, 
    4327, 
    5228, 
    4336, 
    4343, 
    4361, 
    4375, 
    4392, 
    4417, 
    4437, 
    4459, 
    4479, 
    4572, 
    4608, 
    4633, 
    9639, 
    10177, 
    10178, 
    10179, 
    10180, 
    10181
  )

Query time 0.00113

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "548.01"
    },
    "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": 1365,
      "rows_produced_per_join": 1365,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "275.01",
        "eval_cost": "273.00",
        "prefix_cost": "548.01",
        "data_read_per_join": "7M"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`webmarco`.`cscart_categories`.`parent_id` in (4423,4468,9291,4472,10147,10630,4525,4304,4365,10148,9284,4544,4865,4888,5214,4334,9825,10258,4458,9634,4004,4289,4257,4275,4422,9292,9285,4504,4288,9293,5635,5227,5275,4239,4563,4300,4882,4588,4308,5438,4501,4551,5234,5215,5298,4598,5302,4618,5153,5041,4886,4476,5065,4896,4827,5101,4916,4373,5088,4507,5321,5332,4383,4717,4299,5477,5531,4518,4331,4730,5218,4617,4655,5260,4301,5231,5318,4259,5657,4880,4672,4951,5205,5249,5133,5091,4571,4947,4867,4754,5173,5343,5178,4931,5346,4389,5312,4791,4324,4534,5472,4539,5257,5353,4695,4294,4914,4648,5238,4339,4699,4351,4788,4900,4994,5263,5163,4977,5278,4773,5244,5197,5119,5351,5342,4622,5203,4949,5264,5320,4457,4556,4350,5297,5034,4746,5255,4638,4357,4302,4735,4386,4822,4935,5281,4786,5256,5376,5358,5141,4991,4995,4961,4385,4970,4774,5268,4311,4757,4849,4418,4807,5270,5296,5308,5398,5176,5012,4644,5378,4399,5058,5038,4795,4667,4784,5415,4871,5011,5280,4442,4820,5282,5400,5092,5136,4817,5434,5292,5064,4834,4480,4813,5432,5105,5418,4669,5072,4693,4499,4841,5459,5303,4848,4842,5186,5130,5443,4833,5458,5315,4519,4866,5220,9018,4798,4832,4864,4854,4650,4884,4816,5243,4875,4857,5322,4903,4904,4684,5366,7811,4895,4763,9016,4933,5016,4920,5401,4781,5404,4987,4943,10182,9681,5416,10183,5427,5445,5454,5485,10171,4278,5168,4327,5228,4336,4343,4361,4375,4392,4417,4437,4459,4479,4572,4608,4633,9639,10177,10178,10179,10180,10181))"
    }
  }
}

Result

category_id parent_id
4239 4004
4259 4004
4278 4004
4294 4004
4302 4004
4311 4004
4327 4004
4336 4004
4343 4004
4361 4004
4375 4004
4392 4004
4417 4004
4437 4004
4459 4004
4479 4004
4572 4004
4590 4004
4608 4004
4633 4004
9285 4004
9292 4004
9634 4004
4308 4257
4331 4257
4351 4257
4386 4257
4418 4257
4442 4257
4480 4257
4833 4257
4854 4257
4873 4257
4895 4257
4920 4257
4943 4257
4300 4275
4324 4275
4350 4275
4385 4275
4563 4288
4730 4288
4788 4288
4822 4288
4849 4288
4871 4288
5072 4288
4373 4334
4754 4334
4773 4334
4786 4334
4807 4334
4820 4334
4834 4334
4848 4334
4866 4334
4884 4334
4903 4334
4933 4334
4987 4334
10182 4334
10183 4334
4383 4357
4389 4357
4457 4357
4272 4399
4571 4399
4622 4399
4644 4399
4669 4399
4798 4399
4816 4399
7811 4399
9016 4399
9681 4399
9687 4399
5635 4423
5657 4423
4886 4458
4931 4458
4949 4458
4991 4458
5012 4458
5038 4458
5105 4458
5130 4458
4501 4472
4518 4479
4539 4479
4556 4479
4499 4480
4519 4480
4650 4480
4684 4480
4763 4480
4781 4480
9293 4480
4399 4525
4551 4525
4638 4525
4667 4525
4693 4525
4832 4525
4857 4525
4904 4525
5016 4525
4618 4544
4672 4544
4699 4544
4735 4544
4757 4544
4784 4544
4817 4544
4841 4544
4588 4551
4617 4551
4648 4551
4746 4551
4774 4551
4795 4551
4813 4551
4842 4551
4864 4551
4875 4551
9639 4551
9825 4551
10177 4551
10178 4551
10179 4551
10180 4551
10181 4551
4598 4563
4655 4563
4695 4563
4717 4693
4791 4693
5264 4693
4476 4717
4880 4717
4900 4717
4935 4717
4970 4717
5011 4717
5064 4717
5186 4717
5220 4717
5243 4717
4827 4791
4867 4791
4914 4791
4961 4791
5092 4791
5136 4791
5168 4791
5228 4791
10258 4791
9682 4816
9684 4816
9685 4816
9686 4816
4882 4857
5218 4857
5238 4857
5255 4857
5268 4857
5280 4857
5292 4857
5303 4857
5315 4857
5322 4857
5366 4857
5401 4857
5404 4857
5416 4857
5427 4857
5445 4857
5454 4857
5485 4857
10171 4857
10630 4857
4896 4871
4951 4871
4994 4871
5034 4871
4916 4888
4947 4888
4977 4888
4995 4888
5058 4888
5088 4903
5173 4903
5197 4903
5215 4933
5231 4933
5244 4933
5256 4933
5270 4933
5282 4933
5298 4987
5312 4987
5320 4987
5041 5016
5205 5016
5257 5016
5297 5016
5308 5016
5432 5016
5458 5016
10147 5016
5065 5041
5091 5041
5119 5041
5141 5041
5176 5041
5415 5041
5434 5041
5459 5041
5101 5064
5133 5064
5163 5064
5153 5130
5178 5130
5203 5130
5227 5205
5249 5205
5263 5205
5281 5205
5296 5205
4507 5214
4534 5214
5234 5214
5260 5214
5278 5214
5275 5257
5353 5257
4299 5264
5302 5264
5318 5264
5342 5264
5358 5264
5378 5264
5400 5264
5418 5264
5443 5264
9018 5264
5321 5308
5343 5308
5351 5308
5376 5308
5398 5308
5332 5315
5346 5315
5477 5322
5531 5322
5438 5401
5472 5401
9291 9284
10148 9284