SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    23753, 
    7984, 
    7983, 
    23752, 
    7982, 
    7981, 
    23755, 
    8049, 
    23751, 
    8050, 
    23754, 
    8018, 
    8079, 
    8078, 
    8077, 
    8076, 
    8075, 
    8074, 
    8073, 
    7994, 
    8080, 
    7953, 
    7947, 
    7993, 
    7989, 
    8070, 
    8017, 
    8035, 
    7934, 
    8055, 
    7974, 
    8063, 
    7933, 
    7973, 
    8040, 
    23747, 
    8016, 
    8032, 
    8061, 
    8060, 
    8059, 
    8058, 
    7920, 
    23758, 
    23761, 
    7944, 
    8051, 
    8015, 
    8014, 
    7969, 
    8013, 
    8012, 
    7988, 
    7952, 
    7987, 
    23748, 
    8048, 
    8039, 
    8057, 
    8038, 
    8011, 
    7932, 
    7968, 
    7951, 
    7943, 
    8036, 
    8027, 
    8037, 
    7967, 
    8034, 
    8025, 
    8033, 
    8010, 
    8009, 
    7931, 
    7966, 
    7965, 
    8024, 
    7950, 
    8047, 
    8023, 
    7930, 
    8054, 
    8031, 
    7955, 
    8022, 
    7964, 
    8030, 
    7963, 
    8021, 
    8020, 
    7949, 
    8046, 
    8008, 
    8019, 
    7962, 
    7997, 
    23757, 
    7948, 
    7996, 
    7961, 
    23756, 
    8029, 
    8045, 
    8053, 
    7995, 
    7942, 
    7985, 
    8044, 
    7972, 
    7929, 
    7971, 
    7928, 
    7927, 
    7970, 
    7937, 
    8042, 
    8072, 
    8043, 
    8007, 
    7941, 
    7975, 
    8052, 
    7954, 
    7940, 
    23746, 
    8006, 
    8028, 
    7960, 
    7926, 
    7945, 
    8069, 
    8068, 
    8067, 
    8066, 
    8065, 
    7925, 
    7936, 
    8005, 
    8004, 
    8003, 
    7935, 
    23760, 
    8041, 
    7939, 
    7959, 
    7924, 
    7946, 
    7923, 
    23750, 
    8026, 
    7918, 
    8071, 
    7958, 
    23749, 
    23745, 
    23763, 
    7957, 
    23762, 
    23759, 
    7917, 
    23743, 
    8064, 
    23744, 
    8056, 
    7938, 
    7986, 
    7956
  )

Query time 0.00167

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "60.60"
    },
    "table": {
      "table_name": "cscart_categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 298,
      "rows_produced_per_join": 298,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "30.80",
        "eval_cost": "29.80",
        "prefix_cost": "60.60",
        "data_read_per_join": "772K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`maniamall_cscart`.`cscart_categories`.`parent_id` in (23753,7984,7983,23752,7982,7981,23755,8049,23751,8050,23754,8018,8079,8078,8077,8076,8075,8074,8073,7994,8080,7953,7947,7993,7989,8070,8017,8035,7934,8055,7974,8063,7933,7973,8040,23747,8016,8032,8061,8060,8059,8058,7920,23758,23761,7944,8051,8015,8014,7969,8013,8012,7988,7952,7987,23748,8048,8039,8057,8038,8011,7932,7968,7951,7943,8036,8027,8037,7967,8034,8025,8033,8010,8009,7931,7966,7965,8024,7950,8047,8023,7930,8054,8031,7955,8022,7964,8030,7963,8021,8020,7949,8046,8008,8019,7962,7997,23757,7948,7996,7961,23756,8029,8045,8053,7995,7942,7985,8044,7972,7929,7971,7928,7927,7970,7937,8042,8072,8043,8007,7941,7975,8052,7954,7940,23746,8006,8028,7960,7926,7945,8069,8068,8067,8066,8065,7925,7936,8005,8004,8003,7935,23760,8041,7939,7959,7924,7946,7923,23750,8026,7918,8071,7958,23749,23745,23763,7957,23762,23759,7917,23743,8064,23744,8056,7938,7986,7956))"
    }
  }
}

Result

category_id parent_id
7918 7917
7920 7917
7923 7917
7924 7917
7925 7917
7926 7917
7927 7917
7928 7917
7929 7917
7930 7917
7931 7917
7932 7917
7933 7917
7934 7917
23748 7917
23749 7917
23750 7917
7937 7936
7938 7936
7939 7936
7940 7936
7941 7936
7942 7936
7943 7936
7944 7936
7946 7945
7947 7945
7948 7945
7949 7945
7950 7945
7951 7945
7952 7945
7953 7945
7955 7954
7956 7954
7957 7954
7958 7954
7959 7954
7960 7954
7961 7954
7962 7954
7963 7954
7964 7954
7965 7954
7966 7954
7967 7954
7968 7954
7969 7954
7972 7971
7973 7971
7974 7971
7975 7971
7981 7971
7982 7971
7983 7971
7984 7971
23751 7971
23752 7971
23753 7971
23754 7971
23755 7971
7986 7985
7987 7985
7988 7985
7989 7985
7993 7985
7994 7985
23756 7985
23757 7985
23758 7985
8003 7997
8004 7997
8005 7997
8006 7997
8007 7997
8008 7997
8009 7997
8010 7997
8011 7997
8012 7997
8013 7997
8014 7997
8015 7997
8016 7997
8017 7997
8018 7997
23759 7997
23760 7997
23761 7997
23762 7997
23763 7997
8026 8025
8027 8025
8028 8025
8029 8025
8030 8025
8031 8025
8032 8025
8033 8025
8034 8025
8035 8025
8037 8036
8038 8036
8039 8036
8040 8036
8041 8036
8042 8036
8043 8036
8044 8036
8045 8036
8046 8036
8047 8036
8048 8036
8049 8036
8050 8049
8052 8051
8053 8051
8054 8051
8055 8051
8056 8051
8057 8051
8058 8051
8059 8051
8060 8051
8061 8051
8064 8063
8065 8063
8066 8063
8067 8063
8068 8063
8069 8063
8071 8070
8072 8070
8073 8070
8074 8070
8075 8070
8076 8070
8077 8070
8078 8070
8079 8070
23744 23743
23745 23743
23746 23743
23747 23743