SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    9276, 
    9991, 
    9990, 
    9365, 
    8984, 
    9539, 
    9278, 
    9277, 
    9540, 
    9541, 
    9538, 
    9575, 
    9250, 
    9574, 
    9257, 
    2776, 
    2856, 
    2870, 
    2888, 
    2735, 
    2899, 
    2665, 
    2702, 
    2657, 
    2726, 
    2784, 
    2664, 
    2667, 
    2675, 
    2814, 
    2850, 
    3418, 
    2693, 
    2859, 
    10570, 
    2708, 
    2775, 
    2778, 
    2897, 
    2883, 
    2906, 
    2738, 
    2670, 
    2711, 
    2661, 
    2732, 
    2668, 
    2681, 
    2898, 
    2794, 
    2820, 
    2696, 
    2868, 
    2709, 
    2857, 
    2779, 
    10571, 
    2885, 
    2890, 
    2746, 
    2714, 
    2679, 
    2719, 
    2741, 
    2672, 
    3400, 
    2826, 
    2808, 
    2682, 
    2805, 
    2900, 
    2699, 
    10572, 
    2878, 
    2858, 
    2671, 
    2887, 
    2751, 
    2695, 
    2745, 
    2674, 
    2810, 
    2685, 
    2831, 
    10573, 
    2862, 
    2689, 
    2754, 
    2756, 
    2722, 
    10574, 
    2676, 
    2902, 
    2690, 
    2830, 
    2834, 
    2866, 
    2765, 
    2724, 
    2762, 
    2884, 
    10575, 
    2838, 
    2701, 
    2839, 
    2903, 
    2770, 
    2787, 
    2904, 
    2844, 
    2704, 
    2845, 
    2729, 
    2803, 
    2777, 
    2717, 
    2905, 
    2865, 
    2854, 
    2815, 
    2790, 
    2907, 
    2807, 
    2816, 
    2785, 
    2763, 
    2791, 
    2767, 
    2769, 
    2860, 
    2795, 
    2892, 
    2789, 
    2864, 
    2894, 
    8942, 
    2800, 
    2895, 
    2812, 
    2908, 
    2822, 
    2909, 
    2829, 
    2837, 
    2843, 
    2849, 
    8851, 
    10562, 
    10563, 
    9670, 
    9665, 
    9658, 
    9666
  )

Query time 0.00180

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "102.39"
    },
    "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": 253,
      "rows_produced_per_join": 253,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "51.79",
        "eval_cost": "50.60",
        "prefix_cost": "102.39",
        "data_read_per_join": "1M"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`webmarco`.`cscart_categories`.`parent_id` in (9276,9991,9990,9365,8984,9539,9278,9277,9540,9541,9538,9575,9250,9574,9257,2776,2856,2870,2888,2735,2899,2665,2702,2657,2726,2784,2664,2667,2675,2814,2850,3418,2693,2859,10570,2708,2775,2778,2897,2883,2906,2738,2670,2711,2661,2732,2668,2681,2898,2794,2820,2696,2868,2709,2857,2779,10571,2885,2890,2746,2714,2679,2719,2741,2672,3400,2826,2808,2682,2805,2900,2699,10572,2878,2858,2671,2887,2751,2695,2745,2674,2810,2685,2831,10573,2862,2689,2754,2756,2722,10574,2676,2902,2690,2830,2834,2866,2765,2724,2762,2884,10575,2838,2701,2839,2903,2770,2787,2904,2844,2704,2845,2729,2803,2777,2717,2905,2865,2854,2815,2790,2907,2807,2816,2785,2763,2791,2767,2769,2860,2795,2892,2789,2864,2894,8942,2800,2895,2812,2908,2822,2909,2829,2837,2843,2849,8851,10562,10563,9670,9665,9658,9666))"
    }
  }
}

Result

category_id parent_id
2665 2657
2670 2657
2679 2657
2689 2657
2664 2661
2681 2661
2682 2661
2685 2661
2690 2661
2701 2661
2704 2661
2717 2661
2667 2664
2668 2664
2672 2664
2674 2664
2676 2664
2675 2671
2897 2671
3400 2671
2693 2690
2696 2690
2699 2690
2702 2695
2711 2695
2719 2695
2708 2704
2709 2704
2714 2704
2726 2722
2732 2722
2741 2722
2745 2722
2754 2722
2762 2722
2770 2722
2777 2722
2790 2722
2807 2722
2816 2722
2735 2729
2738 2729
2746 2729
2751 2729
2756 2729
2765 2729
2787 2729
2803 2729
2815 2729
2775 2763
2779 2763
2785 2763
2791 2763
2795 2763
2856 2763
2888 2763
2890 2763
2892 2763
2894 2763
2895 2763
2908 2763
2909 2763
9365 2763
9538 2763
9540 2763
9541 2763
2776 2765
2778 2767
2805 2767
2810 2767
2830 2767
2839 2767
2845 2767
2854 2767
8984 2767
9658 2767
2784 2778
2794 2778
2808 2778
2831 2778
2834 2778
2838 2778
2844 2778
2860 2778
2864 2778
2865 2778
8942 2778
10570 2779
10571 2779
10572 2779
10573 2779
10574 2779
10575 2779
2814 2810
2820 2810
2826 2810
2898 2837
2900 2837
2902 2837
2903 2837
2904 2837
2905 2837
2907 2837
2850 2843
2857 2843
2858 2843
2862 2843
2866 2843
2884 2843
2859 2849
2868 2849
2878 2849
2870 2856
2883 2856
2885 2856
2887 2856
2899 2895
2906 2895
3418 3400
9277 9276
9278 9277
9539 9538
9575 9574
9665 9658
9666 9658
9670 9658
9991 9990