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

Query time 0.00085

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "87.25"
    },
    "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": 855,
          "rows_produced_per_join": 94,
          "filtered": "11.11",
          "using_index": true,
          "cost_info": {
            "read_cost": "1.75",
            "eval_cost": "9.50",
            "prefix_cost": "87.25",
            "data_read_per_join": "247K"
          },
          "used_columns": [
            "category_id",
            "id_path"
          ],
          "attached_condition": "(`aomnia_com`.`a`.`id_path` like <cache>(concat('278','/%')))"
        }
      }
    ]
  }
}

Result

category_id
276
305
413
723
724
725
726
727
728
729
414
730
731
732
733
734
735
736
415
737
738
739
740
741
742
416
743
744
745
746
747
748
718
749
750
751
752
753
754
755
719
764
765
766
767
768
720
769
770
771
772
773
774
775
721
776
777
778
779
780
781
722
782
783
784
785
756
757
758
759
760
761
762
763