SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(304, 305, 307) 
  AND category_id != 265

Query time 0.00076

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": 29,
      "filtered": 100,
      "index_condition": "cscart_categories.parent_id in (304,305,307)",
      "attached_condition": "cscart_categories.category_id <> 265"
    }
  }
}

Result

category_id parent_id
315 304
318 304
311 304
314 304
310 304
316 304
309 304
317 304
319 304
312 304
313 304
308 304
1202 307
327 307
328 307
329 307
330 307
331 307
332 307
333 307
334 307
335 307
336 307
337 307
338 307
339 307
340 307
341 307
342 307