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 (
    17246, 13678, 12971, 13155, 16321, 13255, 
    13152, 13683, 17017, 16101, 15072, 
    15879, 16065, 13676, 13666, 13765, 
    13443, 13679
  )

Query time 0.01859

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": 86,
          "filtered": 100,
          "index_condition": "gp.group_id in (17246,13678,12971,13155,16321,13255,13152,13683,17017,16101,15072,15879,16065,13676,13666,13765,13443,13679)"
        }
      },
      {
        "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
20529 18946 71784 12971
20529 18945 71783 12971
20529 18944 71782 12971
20529 3668 71785 12971
20722 19588 72395 13152
20722 3195 72396 13152
20725 19591 72401 13155
20725 3190 72402 13155
20854 20609 72868 13255
20854 20608 72867 13255
20854 20607 72866 13255
20854 20606 72865 13255
20854 20605 72864 13255
20854 20604 72863 13255
20854 20603 72862 13255
20854 20602 72861 13255
20854 20601 72860 13255
20854 20600 72859 13255
20854 20599 72858 13255
20854 20598 72857 13255
20854 2946 72869 13255
21051 21078 73515 13443
21051 2464 73514 13443
21297 22082 74516 13666
21297 22081 74517 13666
21297 2009 74515 13666
21307 22102 74546 13676
21307 22101 74547 13676
21307 1999 74545 13676
21309 22106 74552 13678
21309 22105 74553 13678
21309 1997 74551 13678
21310 22108 74555 13679
21310 22107 74556 13679
21310 1996 74554 13679
21314 22116 74567 13683
21314 22115 74568 13683
21314 1992 74566 13683
21406 22471 74883 13765
21406 22470 74882 13765
21406 22469 74881 13765
21406 22468 74880 13765
21406 22467 74879 13765
21406 22466 74878 13765
21406 1865 74884 13765
22927 28260 79937 15072
22927 28258 79935 15072
22927 28259 79936 15072
22927 28257 79934 15072
22927 28171 79933 15072
23759 36758 82463 15879
23759 36944 82472 15879
23759 36945 82473 15879
23759 36946 82474 15879
23759 36947 82475 15879
23759 36948 82464 15879
23759 36949 82465 15879
23759 36950 82466 15879
23759 36951 82467 15879
23759 36952 82468 15879
23759 36953 82469 15879
23759 36954 82470 15879
23759 36955 82471 15879
23879 38247 83085 16065
23879 38102 83076 16065
23879 38248 83077 16065
23879 38249 83078 16065
23879 38250 83079 16065
23879 38251 83080 16065
23879 38252 83081 16065
23879 38253 83082 16065
23879 38254 83083 16065
23879 38255 83084 16065
23925 38147 83210 16101
23925 38330 83211 16101
24105 40605 83994 16321
24106 40605 83997 16321
24105 40606 83994 16321
24106 40606 83998 16321
24105 4191 83994 16321
24106 4191 83996 16321
24105 40611 83995 16321
24106 40611 83999 16321
24105 40610 83995 16321
24106 40610 83998 16321
24105 40609 83995 16321
24106 40609 83997 16321
24105 40608 83995 16321
24106 40608 83996 16321
24105 40607 83994 16321
24106 40607 83999 16321
24767 47283 86384 17017
24767 47282 86383 17017
24767 47274 86381 17017
24767 47281 86382 17017
24717 49659 86220 17246
24717 49186 86219 17246
24717 49658 86218 17246
24717 49660 87235 17246