SELECT 
  category_id, 
  parent_id 
FROM 
  categories 
WHERE 
  parent_id IN(
    6781, 6782, 6767, 6737, 41, 6775, 6791, 
    6783, 6777, 6792, 40, 6761, 6768, 180, 
    61, 6784, 6776, 6785, 6789, 102, 6740, 
    6794, 6534, 6787, 6741, 6786, 6771, 
    6788, 6790, 6778, 6772, 42, 44, 101, 
    103, 80, 39, 12260
  )

Query time 0.00069

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "15.27"
    },
    "table": {
      "table_name": "categories",
      "access_type": "range",
      "possible_keys": [
        "parent"
      ],
      "key": "parent",
      "used_key_parts": [
        "parent_id"
      ],
      "key_length": "3",
      "rows_examined_per_scan": 73,
      "rows_produced_per_join": 73,
      "filtered": "100.00",
      "using_index": true,
      "cost_info": {
        "read_cost": "7.97",
        "eval_cost": "7.30",
        "prefix_cost": "15.27",
        "data_read_per_join": "191K"
      },
      "used_columns": [
        "category_id",
        "parent_id"
      ],
      "attached_condition": "(`goimagine`.`categories`.`parent_id` in (6781,6782,6767,6737,41,6775,6791,6783,6777,6792,40,6761,6768,180,61,6784,6776,6785,6789,102,6740,6794,6534,6787,6741,6786,6771,6788,6790,6778,6772,42,44,101,103,80,39,12260))"
    }
  }
}

Result

category_id parent_id
6737 40
6738 40
6739 40
6740 40
6741 40
6742 40
6775 41
6776 41
6777 41
6778 41
6779 41
6780 41
6781 41
6787 41
6789 41
12259 41
12260 41
6767 42
6768 42
6760 44
6761 44
6762 102
6763 102
6764 102
6765 102
6766 102
61 6534
180 6534
6769 6534
6770 6534
6771 6534
6772 6534
6773 6534
6782 6781
6783 6781
6784 6781
6785 6781
6786 6781
6788 6781
6791 6790
6792 6790
6793 6790
6794 6790