SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    1215, 1216, 1210, 1218, 1219, 1211, 1212, 
    1223, 1209, 1207, 1205, 1220, 1208, 
    1214, 1217, 1221, 1204, 1206, 1213, 
    1222
  ) 
  AND category_id != 265

Query time 0.00066

JSON explain

{
  "query_block": {
    "select_id": 1,
    "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": 25,
      "filtered": 100,
      "index_condition": "cscart_categories.parent_id in (1215,1216,1210,1218,1219,1211,1212,1223,1209,1207,1205,1220,1208,1214,1217,1221,1204,1206,1213,1222)",
      "attached_condition": "cscart_categories.category_id <> 265"
    }
  }
}

Result

category_id parent_id
1210 1209
1211 1209
1212 1209
1215 1214
1216 1214
1218 1217
1219 1217