SELECT 
  pf.feature_id, 
  pf.feature_style, 
  pf.position, 
  pf.purpose, 
  pf.display_on_catalog, 
  pfd.description, 
  pfd.internal_name, 
  pfd.prefix, 
  pfd.suffix, 
  (
    CASE WHEN pf.purpose = 'group_catalog_item' THEN 0 ELSE 1 END
  ) AS purpose_position 
FROM 
  cscart_product_features AS pf 
  INNER JOIN cscart_product_features_descriptions AS pfd ON pf.feature_id = pfd.feature_id 
  AND pfd.lang_code = 'en' 
WHERE 
  pf.feature_id IN (2, 6) 
ORDER BY 
  purpose_position ASC, 
  pf.position ASC, 
  pf.feature_id ASC

Query time 0.00031

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "4.11"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "2.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "pf",
            "access_type": "range",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "feature_id"
            ],
            "key_length": "3",
            "rows_examined_per_scan": 2,
            "rows_produced_per_join": 2,
            "filtered": "100.00",
            "index_condition": "(`betaatif_store`.`pf`.`feature_id` in (2,6))",
            "cost_info": {
              "read_cost": "1.21",
              "eval_cost": "0.20",
              "prefix_cost": "1.41",
              "data_read_per_join": "880"
            },
            "used_columns": [
              "feature_id",
              "purpose",
              "feature_style",
              "display_on_catalog",
              "position"
            ]
          }
        },
        {
          "table": {
            "table_name": "pfd",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "feature_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "betaatif_store.pf.feature_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.50",
              "eval_cost": "0.20",
              "prefix_cost": "2.11",
              "data_read_per_join": "4K"
            },
            "used_columns": [
              "feature_id",
              "description",
              "prefix",
              "suffix",
              "lang_code",
              "internal_name"
            ]
          }
        }
      ]
    }
  }
}

Result

feature_id feature_style position purpose display_on_catalog description internal_name prefix suffix purpose_position
2 dropdown_labels 0 group_variation_catalog_item N Rugs Size Rugs Size 1
6 dropdown_images 0 group_variation_catalog_item Y اللون اللون 1