SELECT 
  category_id, 
  parent_id 
FROM 
  categories 
WHERE 
  parent_id IN(
    13311, 13312, 12085, 12089, 13244, 12109, 
    13045, 12090, 12088, 12111, 12113, 
    12084, 12110, 12112, 13302, 13571, 
    12086, 12083, 13303, 12956, 12087, 
    13304, 13572, 12108, 13305, 13573, 
    12082, 12114, 13306, 12115, 13308, 
    11965, 12116, 13309, 12117, 12118, 
    13512
  )

Query time 0.00084

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "12.70"
    },
    "table": {
      "table_name": "categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 60,
      "rows_produced_per_join": 60,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "6.70",
        "eval_cost": "6.00",
        "prefix_cost": "12.70",
        "data_read_per_join": "157K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`goimagine`.`categories`.`parent_id` in (13311,13312,12085,12089,13244,12109,13045,12090,12088,12111,12113,12084,12110,12112,13302,13571,12086,12083,13303,12956,12087,13304,13572,12108,13305,13573,12082,12114,13306,12115,13308,11965,12116,13309,12117,12118,13512))"
    }
  }
}

Result

category_id parent_id
12084 12083
12085 12083
12088 12083
12089 12083
13244 12083
13302 12083
13303 12083
13304 12083
13305 12083
13306 12083
13307 12083
13308 12083
13309 12083
13310 12083
13571 12083
13572 12083
13573 12083
12083 12086
12087 12086
12109 12108
12110 12108
12111 12108
12112 12108
12113 12108
13045 12108
13311 12956
13312 12956