SELECT 
  a.category_id 
FROM 
  cscart_categories as a 
  LEFT JOIN cscart_categories as b ON b.category_id IN (2653) 
WHERE 
  a.id_path LIKE CONCAT(b.id_path, '/%')

Query time 0.00271

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "1494.60"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "b",
          "access_type": "const",
          "possible_keys": [
            "PRIMARY",
            "p_category_id"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "category_id"
          ],
          "key_length": "3",
          "ref": [
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.00",
            "eval_cost": "0.20",
            "prefix_cost": "0.00",
            "data_read_per_join": "5K"
          },
          "used_columns": [
            "category_id",
            "id_path"
          ]
        }
      },
      {
        "table": {
          "table_name": "a",
          "access_type": "index",
          "key": "id_path",
          "used_key_parts": [
            "id_path"
          ],
          "key_length": "767",
          "rows_examined_per_scan": 6988,
          "rows_produced_per_join": 776,
          "filtered": "11.11",
          "using_index": true,
          "cost_info": {
            "read_cost": "97.00",
            "eval_cost": "155.27",
            "prefix_cost": "1494.60",
            "data_read_per_join": "4M"
          },
          "used_columns": [
            "category_id",
            "id_path"
          ],
          "attached_condition": "(`webmarco`.`a`.`id_path` like <cache>(concat('2653','/%')))"
        }
      }
    ]
  }
}

Result

category_id
2656
2659
2660
2663
2666
2669
2673
2678
2680
2683
2684
2687
2688
2698
2705
2716
2720
2691
2692
2694
2697
2700
2703
2707
2710
2712
2715
2718
2723
2731
2727
2733
2737
2740
2742
2744
2747
2749
2750
2752
2755
2757
2758
2764
2766
2768
2771
2798
2802
2806
2809
2817
2819
2825
2828
2841
2847
2852
2842
2774
2780
2786
9251
9252
9253
9254
9972
2658
10562
10563
2657
2665
2670
2679
2689
2661
2664
2667
2668
2672
2674
2676
2681
2682
2685
2690
2693
2696
2699
2701
2704
2708
2709
2714
2717
2671
2675
2897
3400
3418
2695
2702
2711
2719
2722
2726
2732
2741
2745
2754
2762
2770
2777
2790
2807
2816
2724
2729
2735
2738
2746
2751
2756
2765
2776
2787
2803
2815
2763
2775
2779
10570
10571
10572
10573
10574
10575
2785
2791
2795
2856
2870
2883
2885
2887
2888
2890
2892
2894
2895
2899
2906
2908
2909
9365
9538
9539
9540
9541
2767
2778
2784
2794
2808
2831
2834
2838
2844
2860
2864
2865
8942
2805
2810
2814
2820
2826
2830
2839
2845
2854
8984
9658
9665
9666
9670
2769
2789
2800
2812
2822
2829
2837
2898
2900
2902
2903
2904
2905
2907
2843
2850
2857
2858
2862
2866
2884
2849
2859
2868
2878
8851
9250
9257
9276
9277
9278
9574
9575
9990
9991
2721
2753
2759
2783
8943
2725
2728
2730
2734
2736
2739
2743
2748
2760
2772
2782
2793
2801
2811
2818
2824
2827
2833
2821
2840
2848
2851
2855
9296
9297
9985
2761
2773
2781
2788
2792
2796
2797
10534
10536
2813
2823
2836
2846
2804
10170
10225
10226
10533
2863
2867
2871
2872
2873
2875
2876
2886
10121
10122
2891
2877
2879
2881
2882
2889
2893
2896
2853
2861
2869
2874
2880
9375
9691
9965
10125
10127
10128
10129
10130
10131
9966
9971
9977
9978
9979
9982
9983
9984
9986
9992
9993
9994
9967
10169
9968
9969
9970
9973
9980
9981