SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(18319, 18415) 
  AND category_id != 1

Query time 0.00079

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_categories",
          "access_type": "range",
          "possible_keys": ["PRIMARY", "parent", "p_category_id"],
          "key": "parent",
          "key_length": "3",
          "used_key_parts": ["parent_id"],
          "rows": 42,
          "filtered": 100,
          "index_condition": "cscart_categories.parent_id in (18319,18415)",
          "attached_condition": "cscart_categories.category_id <> 1"
        }
      }
    ]
  }
}

Result

category_id parent_id
18348 18319
18320 18319
18349 18319
18323 18319
18333 18319
18347 18319
18350 18319
18360 18319
18367 18319
18368 18319
18369 18319
18370 18319
18371 18319
18372 18319
18379 18319
18380 18319
18394 18319
18397 18319
18398 18319
18404 18319
18405 18319
18406 18319
18407 18319
18408 18319
18416 18415
18531 18415
18532 18415
18533 18415
18536 18415
18545 18415
18546 18415
18552 18415
18558 18415
18584 18415
18596 18415
18620 18415
18621 18415
18641 18415
18646 18415
18647 18415
18648 18415
18649 18415