SELECT 
  category_id 
FROM 
  cscart_categories 
WHERE 
  id_path LIKE '18318/18415/18649/%'

Query time 0.00004

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_categories",
          "access_type": "range",
          "possible_keys": ["id_path"],
          "key": "id_path",
          "key_length": "767",
          "used_key_parts": ["id_path"],
          "rows": 13,
          "filtered": 100,
          "index_condition": "cscart_categories.id_path like '18318/18415/18649/%'"
        }
      }
    ]
  }
}

Result

category_id
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663