SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    535, 
    67, 
    19, 
    56, 
    14, 
    556, 
    547, 
    35, 
    39, 
    575, 
    8, 
    31, 
    296, 
    99, 
    23, 
    674, 
    336, 
    93, 
    26, 
    53, 
    409, 
    554, 
    63, 
    382, 
    30, 
    357, 
    356, 
    285, 
    286, 
    256, 
    347, 
    581, 
    22, 
    574, 
    40, 
    366, 
    15, 
    25, 
    105, 
    94, 
    100, 
    580, 
    28, 
    576, 
    49, 
    32, 
    2, 
    20, 
    377, 
    383, 
    82, 
    9, 
    36, 
    104, 
    516, 
    4, 
    84, 
    37, 
    361, 
    577, 
    16, 
    65, 
    50, 
    346, 
    429, 
    676, 
    41, 
    805, 
    33, 
    380, 
    428, 
    17, 
    345, 
    975, 
    362, 
    578, 
    66, 
    27, 
    95, 
    51, 
    12, 
    48, 
    11, 
    34, 
    38, 
    98, 
    3, 
    344, 
    10, 
    896, 
    564, 
    45, 
    860, 
    5, 
    29, 
    421, 
    52, 
    58, 
    385, 
    47, 
    803, 
    46, 
    348, 
    21, 
    520, 
    59, 
    6, 
    423, 
    96, 
    24, 
    101, 
    349, 
    365, 
    424, 
    72, 
    368, 
    430, 
    60, 
    1211, 
    379, 
    446, 
    92, 
    340, 
    110, 
    828, 
    164, 
    71, 
    7, 
    579, 
    673, 
    90
  )

Query time 0.00161

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "150.21"
    },
    "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": 261,
      "rows_produced_per_join": 261,
      "filtered": "100.00",
      "index_condition": "(`cscartdb`.`cscart_categories`.`parent_id` in (535,67,19,56,14,556,547,35,39,575,8,31,296,99,23,674,336,93,26,53,409,554,63,382,30,357,356,285,286,256,347,581,22,574,40,366,15,25,105,94,100,580,28,576,49,32,2,20,377,383,82,9,36,104,516,4,84,37,361,577,16,65,50,346,429,676,41,805,33,380,428,17,345,975,362,578,66,27,95,51,12,48,11,34,38,98,3,344,10,896,564,45,860,5,29,421,52,58,385,47,803,46,348,21,520,59,6,423,96,24,101,349,365,424,72,368,430,60,1211,379,446,92,340,110,828,164,71,7,579,673,90))",
      "cost_info": {
        "read_cost": "124.11",
        "eval_cost": "26.10",
        "prefix_cost": "150.21",
        "data_read_per_join": "876K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ]
    }
  }
}

Result

category_id parent_id
8 2
45 2
9 2
46 2
10 2
47 2
96 2
12 2
368 2
110 2
379 2
564 2
49 3
50 3
51 3
53 3
256 3
285 3
286 3
860 3
14 4
15 4
16 4
17 4
52 4
98 4
347 4
424 4
516 4
574 4
520 4
579 4
578 4
803 4
19 5
22 5
25 5
104 5
101 5
409 5
975 5
26 6
27 6
28 6
56 6
29 6
348 6
349 6
1211 6
30 7
105 7
90 7
31 8
32 8
33 8
34 8
385 8
896 8
35 9
36 9
37 9
38 9
58 9
59 9
60 9
340 9
345 9
365 9
39 10
40 10
41 10
44 11
18 11
123 12
547 14
554 14
556 14
580 14
581 14
575 17
576 17
577 17
20 22
344 22
429 22
61 39
62 39
364 40
360 41
357 45
356 47
63 48
65 48
66 48
67 48
71 48
673 48
82 49
84 49
296 49
535 50
99 52
100 52
676 52
93 72
366 72
805 72
132 90
94 92
95 92
23 92
361 92
362 92
428 92
133 95
380 96
382 96
383 96
24 110
674 285
381 380
388 382
21 409
346 409
430 409
446 409
11 424
421 424
423 424
336 428
377 428