SELECT 
  id_path 
FROM 
  cscart_categories 
WHERE 
  category_id IN (322, 324, 325, 326, 327)

Query time 0.00018

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_categories",
          "access_type": "range",
          "possible_keys": ["PRIMARY", "p_category_id"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["category_id"],
          "rows": 5,
          "filtered": 100,
          "index_condition": "cscart_categories.category_id in (322,324,325,326,327)"
        }
      }
    ]
  }
}

Result

id_path
322
324
325
326
327