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 (
    16772, 15619, 12776, 17407, 12257, 12259, 
    14896, 14689, 16683, 15838, 12479, 
    15618, 15615, 12654, 15067, 12658, 
    15535, 14600, 12622, 15537, 12994
  )

Query time 0.01865

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": 79,
          "filtered": 100,
          "index_condition": "gp.group_id in (16772,15619,12776,17407,12257,12259,14896,14689,16683,15838,12479,15618,15615,12654,15067,12658,15535,14600,12622,15537,12994)"
        }
      },
      {
        "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
19735 15249 68635 12257
19735 15248 68634 12257
19735 15247 68633 12257
19735 15246 68632 12257
19735 6287 68636 12257
19738 15263 68647 12259
19738 15262 68646 12259
19738 15261 68645 12259
19738 15260 68644 12259
19738 6285 68648 12259
19977 16510 69812 12479
19977 16509 69811 12479
19977 5625 69813 12479
20147 17848 70491 12622
20147 4939 70492 12622
20186 17997 70638 12654
20186 17993 70637 12654
20186 17992 70636 12654
20186 17991 70635 12654
20186 17990 70634 12654
20186 4823 70634 12654
20194 18049 70666 12658
20194 18045 70665 12658
20194 18044 70664 12658
20194 18043 70663 12658
20194 18042 70662 12658
20194 4814 70662 12658
20319 18380 71073 12776
20319 4304 71074 12776
20558 19167 71906 12994
20558 3625 71907 12994
22332 25726 78274 14600
22332 25725 78273 14600
22332 25724 78272 14600
22332 25723 78271 14600
22332 25722 78270 14600
22332 406 78275 14600
22427 26151 78676 14689
22427 26149 78675 14689
22427 26148 78674 14689
22427 276 78674 14689
22677 27140 79378 14896
22677 1838 79377 14896
22923 28228 79924 15067
22923 28163 79923 15067
23403 32703 81172 15535
23403 33105 81173 15535
23403 33106 81174 15535
23403 33107 81175 15535
23403 33108 81176 15535
23405 32706 81181 15537
23405 33112 81182 15537
23490 33715 81505 15615
23490 33789 81506 15615
23490 33790 81507 15615
23490 33791 81508 15615
23490 33719 81505 15618
23490 33799 81506 15618
23490 33800 81507 15618
23490 33801 81508 15618
23490 33720 81505 15619
23490 33802 81506 15619
23490 33803 81507 15619
23490 33804 81508 15619
23715 36492 82326 15838
23715 36636 82327 15838
23715 36637 82328 15838
23715 36638 82329 15838
24462 43933 85324 16683
24462 43934 85325 16683
24462 6283 85323 16683
24543 44952 85601 16772
24543 44953 85602 16772
24543 44954 85603 16772
24543 2214 85600 16772
25185 5629 87892 17407
25185 50679 87893 17407