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

Query time 0.00433

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "368.89"
    },
    "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.10",
            "prefix_cost": "0.00",
            "data_read_per_join": "3K"
          },
          "used_columns": [
            "category_id",
            "id_path"
          ]
        }
      },
      {
        "table": {
          "table_name": "a",
          "access_type": "ALL",
          "rows_examined_per_scan": 3444,
          "rows_produced_per_join": 382,
          "filtered": "11.11",
          "cost_info": {
            "read_cost": "24.49",
            "eval_cost": "38.26",
            "prefix_cost": "368.89",
            "data_read_per_join": "1M"
          },
          "used_columns": [
            "category_id",
            "id_path"
          ],
          "attached_condition": "(`s2cart`.`a`.`id_path` like <cache>(concat('2698','/%')))"
        }
      }
    ]
  }
}

Result

category_id
2699
2700
2701
2702
2703
2704
2705
2719
2720
2721
2722
2723
2766
2767
2796
2797
2798
2799
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2987
2988
2989
2990
2991
3111
3112
3113
3114
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3152
3153
3154
3155
3156
3157
3158
3159
3160
3162
3163
3164
3165
3166
3167
3168
3169
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3368
3369
3370
3371
3372
3373
3161
2878
2802
2923
3115