SELECT 
  pfv.feature_id, 
  pfv.product_id, 
  pfv.variant_id, 
  gp.group_id 
FROM 
  cscart_product_features_values AS pfv 
  INNER JOIN cscart_product_variation_group_products AS gp ON pfv.product_id = gp.product_id 
  INNER JOIN cscart_product_variation_group_features AS gpf ON gpf.group_id = gp.group_id 
  AND gpf.feature_id = pfv.feature_id 
WHERE 
  pfv.lang_code = 'vi' 
  AND gp.group_id IN (
    13674, 12529, 15490, 16910, 16312, 12778, 
    12348, 12533, 13454, 17195, 14634, 
    13667, 16758, 15854, 12642, 17189, 
    17196, 12713, 12487, 12662
  )

Query time 0.02575

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "gp",
          "access_type": "range",
          "possible_keys": ["PRIMARY", "idx_group_id"],
          "key": "idx_group_id",
          "key_length": "3",
          "used_key_parts": ["group_id"],
          "rows": 88,
          "filtered": 100,
          "index_condition": "gp.group_id in (13674,12529,15490,16910,16312,12778,12348,12533,13454,17195,14634,13667,16758,15854,12642,17189,17196,12713,12487,12662)"
        }
      },
      {
        "table": {
          "table_name": "gpf",
          "access_type": "ref",
          "possible_keys": ["PRIMARY", "idx_group_id"],
          "key": "idx_group_id",
          "key_length": "3",
          "used_key_parts": ["group_id"],
          "ref": ["dev_db.gp.group_id"],
          "rows": 1,
          "filtered": 100
        }
      },
      {
        "table": {
          "table_name": "pfv",
          "access_type": "ref",
          "possible_keys": [
            "PRIMARY",
            "fl",
            "lang_code",
            "product_id",
            "fpl",
            "idx_product_feature_variant_id"
          ],
          "key": "idx_product_feature_variant_id",
          "key_length": "12",
          "used_key_parts": ["product_id", "feature_id", "lang_code"],
          "ref": ["dev_db.gp.product_id", "dev_db.gpf.feature_id", "const"],
          "rows": 1,
          "filtered": 100,
          "attached_condition": "pfv.lang_code = 'vi'",
          "using_index": true
        }
      }
    ]
  }
}

Result

feature_id product_id variant_id group_id
19838 15668 68984 12348
19838 15667 68983 12348
19838 15666 68982 12348
19838 15665 68981 12348
19838 15664 68980 12348
19838 15663 68985 12348
19838 5962 68979 12348
19985 16538 69848 12487
19985 16537 69847 12487
19985 5595 69849 12487
20033 16786 70045 12529
20033 16785 70044 12529
20033 16784 70043 12529
20033 16783 70042 12529
20033 16782 70041 12529
20033 5474 70046 12529
20037 16809 70072 12533
20037 16808 70071 12533
20037 16807 70070 12533
20037 16806 70069 12533
20037 16805 70068 12533
20037 16804 70067 12533
20037 16803 70073 12533
20037 5464 70066 12533
20167 17909 70572 12642
20167 17908 70571 12642
20167 4872 70573 12642
20202 18101 70694 12662
20202 18097 70693 12662
20202 18096 70692 12662
20202 18095 70691 12662
20202 18094 70690 12662
20202 4806 70690 12662
20255 18245 70878 12713
20255 4464 70879 12713
20321 18382 71077 12778
20321 4293 71078 12778
21062 21089 73537 13454
21062 2453 73536 13454
21298 22084 74519 13667
21298 22083 74520 13667
21298 2008 74518 13667
21305 22098 74540 13674
21305 22097 74541 13674
21305 2001 74539 13674
22367 25849 78424 14634
22367 25848 78423 14634
22367 25847 78425 14634
22367 353 78422 14634
23350 27854 81002 15490
23350 32747 81003 15490
23350 32748 81004 15490
23350 32749 81005 15490
23350 32750 81006 15490
23350 32751 81007 15490
23730 36295 82372 15854
23730 36687 82373 15854
23730 36688 82374 15854
23730 36689 82375 15854
24096 40580 83970 16312
24096 40579 83969 16312
24096 40578 83968 16312
24096 40577 83967 16312
24096 40576 83966 16312
24096 40575 83965 16312
24096 40535 83964 16312
24520 44753 85538 16758
24520 44790 85539 16758
24520 44791 85540 16758
24520 44792 85541 16758
24655 46183 86038 16910
24655 46273 86037 16910
24655 46274 86039 16910
24655 46275 86040 16910
24934 48677 86938 17189
24934 48699 86939 17189
24934 48700 86940 17189
24934 48701 86941 17189
24940 48683 86962 17195
24940 48719 86963 17195
24940 48720 86964 17195
24940 48721 86965 17195
24941 48684 86966 17196
24941 48722 86967 17196
24941 48723 86968 17196
24941 48724 86969 17196