SELECT 
  category_id 
FROM 
  cscart_categories 
WHERE 
  id_path LIKE '18318/18319/%'

Query time 0.00006

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": 55,
          "filtered": 100,
          "index_condition": "cscart_categories.id_path like '18318/18319/%'"
        }
      }
    ]
  }
}

Result

category_id
18320
18323
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18379
18380
18381
18382
18383
18384
18385
18386
18387
18389
18390
18394
18397
18398
18404
18405
18406
18407
18408