SELECT 
  id_path 
FROM 
  cscart_categories 
WHERE 
  category_id IN (
    266, 267, 271, 276, 277, 278, 288, 297, 
    298, 300, 301, 314, 317, 319, 322, 323
  )

Query time 0.02882

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "6.64"
    },
    "table": {
      "table_name": "cscart_categories",
      "access_type": "ALL",
      "possible_keys": [
        "PRIMARY",
        "p_category_id"
      ],
      "rows_examined_per_scan": 59,
      "rows_produced_per_join": 16,
      "filtered": "27.12",
      "cost_info": {
        "read_cost": "5.04",
        "eval_cost": "1.60",
        "prefix_cost": "6.64",
        "data_read_per_join": "41K"
      },
      "used_columns": [
        "category_id",
        "id_path"
      ],
      "attached_condition": "(`wearethehelpful_scalesta_net`.`cscart_categories`.`category_id` in (266,267,271,276,277,278,288,297,298,300,301,314,317,319,322,323))"
    }
  }
}

Result

id_path
267/266
267
267/271
276/288
276
277
278
297
297/298
297/300
297/301
276/314
277/317
277/319
278/322
278/323