SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    277, 245, 267, 228, 275, 219, 196, 223, 
    968, 166, 374, 378, 509, 270, 823, 269, 
    278, 483, 375, 487, 250, 376, 1025, 309, 
    203, 319, 377, 241
  ) 
  AND category_id != 264

Query time 0.00152

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "38.09"
    },
    "table": {
      "table_name": "cscart_categories",
      "access_type": "range",
      "possible_keys": [
        "PRIMARY",
        "parent",
        "p_category_id"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id",
        "category_id"
      ],
      "key_length": "6",
      "rows_examined_per_scan": 189,
      "rows_produced_per_join": 189,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "19.19",
        "eval_cost": "18.90",
        "prefix_cost": "38.09",
        "data_read_per_join": "493K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "((`aomnia_com`.`cscart_categories`.`parent_id` in (277,245,267,228,275,219,196,223,968,166,374,378,509,270,823,269,278,483,375,487,250,376,1025,309,203,319,377,241)) and (`aomnia_com`.`cscart_categories`.`category_id` <> 264))"
    }
  }
}

Result

category_id parent_id
174 166
234 166
321 166
331 166
787 166
803 166
809 166
814 166
820 166
1133 166
197 196
198 196
199 196
333 196
204 203
209 203
215 203
216 203
399 203
454 219
455 219
456 219
457 219
458 219
459 219
224 223
486 223
590 223
595 223
601 223
606 223
460 228
461 228
462 228
463 228
464 228
442 241
443 241
436 245
437 245
438 245
439 245
440 245
441 245
1089 245
1104 245
1118 245
418 250
419 250
420 250
421 250
422 250
891 250
892 250
893 250
894 250
895 250
423 267
424 267
425 267
426 267
427 267
314 269
315 269
316 269
380 269
432 269
433 269
435 269
408 270
409 270
410 270
411 270
412 270
266 275
428 275
429 275
430 275
431 275
656 275
682 275
358 277
359 277
276 278
413 278
414 278
415 278
416 278
718 278
719 278
720 278
721 278
722 278
756 278
310 309
616 309
625 309
632 309
637 309
444 319
445 319
446 319
447 319
448 319
449 319
450 319
451 319
452 319
453 319
465 374
466 374
467 374
468 374
400 375
401 375
402 375
403 375
404 376
405 376
406 376
407 376
394 377
395 377
396 377
397 377
379 378
390 378
391 378
392 378
393 378
543 378
544 378
549 378
551 378
552 378
488 487
489 487
490 487
510 509
511 509
512 509
824 823
834 823
843 823
849 823
857 823
865 823
872 823
878 823
884 823
167 968
795 968
972 968
982 968
989 968
997 968
1003 968
1011 968
1018 968
271 1025
1037 1025
1044 1025
1051 1025
1057 1025
1132 1025