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

Query time 0.00268

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "859.70"
    },
    "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": "2K"
          },
          "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": 7821,
          "rows_produced_per_join": 868,
          "filtered": "11.11",
          "using_index": true,
          "cost_info": {
            "read_cost": "77.60",
            "eval_cost": "86.89",
            "prefix_cost": "859.70",
            "data_read_per_join": "2M"
          },
          "used_columns": [
            "category_id",
            "id_path"
          ],
          "attached_condition": "(`maniamall_cscart`.`a`.`id_path` like <cache>(concat('290/19342/19352','/%')))"
        }
      }
    ]
  }
}

Result

category_id
19353
19354
19355
19364
21026
21150
19361
19362
19363
21103
21132
19409
19410
19413
19414
21130
20999
21000
21006
21021
21080
21136
21152
21133
21151
19379
19380
19401
19416
19417
19422
19557
19558
21004
21005
21101
20990
21060
21061
21343
21385
21085
21086
21147
21321
19356
19357
19360
21153
19358
19359
19825
21092
21137
19365
19366
19367
19368
19369
19406
19415
20991
21123
19372
19373
19374
20954
21140
19402
19439
19440
19517
21100
19370
19371
19377
19378
19388
19396
19399
19400
19420
19421
21010
19375
19376
19397
19405
19428
19436
19444
20988
21063
21156
19384
19385
19433
19394
19395
19398
19403
19404
19418
19419
20808
21124
19437
19438
21155