SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    403, 298, 299, 300, 301, 303, 305, 306, 
    321, 324, 362, 363, 399, 388, 389, 390, 
    391, 393, 394, 395, 396, 397, 401, 405
  ) 
  AND category_id != 264

Query time 0.00040

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "7.91"
    },
    "table": {
      "table_name": "cscart_categories",
      "access_type": "ALL",
      "possible_keys": [
        "PRIMARY",
        "parent",
        "p_category_id"
      ],
      "rows_examined_per_scan": 68,
      "rows_produced_per_join": 28,
      "filtered": "41.18",
      "cost_info": {
        "read_cost": "5.11",
        "eval_cost": "2.80",
        "prefix_cost": "7.91",
        "data_read_per_join": "96K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "((`cscartdevel`.`cscart_categories`.`parent_id` in (403,298,299,300,301,303,305,306,321,324,362,363,399,388,389,390,391,393,394,395,396,397,401,405)) and (`cscartdevel`.`cscart_categories`.`category_id` <> 264))"
    }
  }
}

Result

category_id parent_id
348 399
392 391
386 391
398 399
400 399
404 391