SELECT 
  category_id, 
  parent_id 
FROM 
  cscart_categories 
WHERE 
  parent_id IN(
    314, 254, 287, 277, 313, 318, 278, 315, 
    288, 317, 255, 289, 316, 279, 290, 256, 
    257, 259, 258, 261, 260, 312, 281, 263, 
    264, 265, 267, 276, 293, 292
  )

Query time 0.00006

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "cscart_categories",
      "access_type": "ALL",
      "possible_keys": ["parent"],
      "rows": 32,
      "filtered": 100,
      "attached_condition": "cscart_categories.parent_id in (314,254,287,277,313,318,278,315,288,317,255,289,316,279,290,256,257,259,258,261,260,312,281,263,264,265,267,276,293,292)"
    }
  }
}

Result

category_id parent_id
277 256
287 255
313 314
314 312
318 315
278 256
288 255
315 312
317 314
279 256
289 255
316 312
290 255
294 255
258 261
263 257
264 257
265 257
267 257
276 257
293 261
292 261