SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    3123, 
    3124, 
    9832, 
    3161, 
    3283, 
    3367, 
    3120, 
    3121, 
    3122, 
    3162, 
    3402, 
    3125, 
    3403, 
    3404, 
    3284, 
    3390, 
    3163, 
    3164, 
    3165, 
    3110, 
    3285, 
    3286, 
    3126, 
    3127, 
    3128, 
    3166, 
    3129, 
    3287, 
    3288, 
    3289, 
    3290, 
    3291, 
    3260, 
    3391, 
    3167, 
    3111, 
    3347, 
    3168, 
    3112, 
    3113, 
    3114, 
    3292, 
    3169, 
    3405, 
    3406, 
    3130, 
    3104, 
    3170, 
    3392, 
    3222, 
    3393, 
    3394, 
    3395, 
    3396, 
    3269, 
    3293, 
    3294, 
    3295, 
    3296, 
    3297, 
    3298, 
    3299, 
    3223, 
    3300, 
    3301, 
    3224, 
    3131, 
    3132, 
    3171, 
    3261, 
    3262, 
    3225, 
    3348, 
    3349, 
    3172, 
    3568, 
    3397, 
    3350, 
    3173, 
    3133, 
    3134, 
    3368, 
    3369, 
    3226, 
    3370, 
    3371, 
    3372, 
    3373, 
    3374, 
    3407, 
    3375, 
    3376, 
    3377, 
    3135, 
    3136, 
    3137, 
    3174, 
    3227, 
    3228, 
    3398, 
    3175, 
    3263, 
    3229, 
    3176, 
    3177, 
    3230, 
    3231, 
    3302, 
    3551, 
    3587, 
    3724, 
    9962, 
    3577, 
    3570, 
    9020, 
    3708, 
    3709, 
    3588, 
    3559, 
    3728, 
    3580, 
    3590, 
    3581, 
    3714, 
    3594, 
    3715, 
    3718
  )

Query time 0.00283

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "89.17"
    },
    "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": 220,
      "rows_produced_per_join": 220,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "45.17",
        "eval_cost": "44.00",
        "prefix_cost": "89.17",
        "data_read_per_join": "1M"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`webmarco`.`cscart_categories`.`parent_id` in (3123,3124,9832,3161,3283,3367,3120,3121,3122,3162,3402,3125,3403,3404,3284,3390,3163,3164,3165,3110,3285,3286,3126,3127,3128,3166,3129,3287,3288,3289,3290,3291,3260,3391,3167,3111,3347,3168,3112,3113,3114,3292,3169,3405,3406,3130,3104,3170,3392,3222,3393,3394,3395,3396,3269,3293,3294,3295,3296,3297,3298,3299,3223,3300,3301,3224,3131,3132,3171,3261,3262,3225,3348,3349,3172,3568,3397,3350,3173,3133,3134,3368,3369,3226,3370,3371,3372,3373,3374,3407,3375,3376,3377,3135,3136,3137,3174,3227,3228,3398,3175,3263,3229,3176,3177,3230,3231,3302,3551,3587,3724,9962,3577,3570,9020,3708,3709,3588,3559,3728,3580,3590,3581,3714,3594,3715,3718))"
    }
  }
}

Result

category_id parent_id
3120 3104
3121 3104
3122 3104
3123 3104
3124 3104
3125 3104
3126 3104
3127 3104
3128 3104
3129 3104
3130 3104
3131 3104
3132 3104
3133 3104
3134 3104
3135 3104
3136 3104
3137 3104
3161 3130
3162 3130
3163 3130
3164 3130
3165 3130
3166 3130
3167 3130
3168 3130
3169 3130
3170 3130
3171 3130
3172 3130
3173 3130
3174 3130
3175 3130
3176 3130
3177 3130
3724 3169
3728 3169
3260 3222
3261 3222
3262 3222
3263 3222
3283 3223
3284 3223
3285 3223
3286 3223
3287 3223
3288 3223
3289 3223
3290 3223
3291 3223
3292 3223
3293 3223
3294 3223
3295 3223
3296 3223
3297 3223
3298 3223
3299 3223
3300 3223
3301 3223
3302 3223
3347 3225
3348 3225
3349 3225
3350 3225
3367 3226
3368 3226
3369 3226
3370 3226
3371 3226
3372 3226
3373 3226
3374 3226
3375 3226
3376 3226
3377 3226
3390 3228
3391 3228
3392 3228
3393 3228
3394 3228
3395 3228
3396 3228
3397 3228
3398 3228
3587 3230
3588 3230
3590 3230
3594 3230
3708 3231
3709 3231
3714 3231
3715 3231
3718 3231
3551 3350
3559 3350
3402 3390
3403 3390
3404 3390
3405 3390
3406 3390
3407 3390
3568 3397
3570 3397
3577 3398
3580 3398
3581 3398
9962 9832