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 (
    12507, 15903, 16934, 13261, 16979, 16094, 
    15645, 16846, 16499, 12540, 13081, 
    17119, 13546, 12914, 16093
  )

Query time 0.00922

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": 123,
          "filtered": 100,
          "index_condition": "gp.group_id in (12507,15903,16934,13261,16979,16094,15645,16846,16499,12540,13081,17119,13546,12914,16093)"
        }
      },
      {
        "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
20008 50076 69928 12507
20008 50077 69929 12507
20008 5549 69930 12507
20044 50563 70104 12540
20044 50562 70103 12540
20044 5445 70102 12540
20464 18770 71581 12914
20464 18769 71579 12914
20464 3874 71580 12914
20648 19348 72169 13081
20648 3385 72168 13081
20860 20644 72909 13261
20860 2922 72910 13261
21160 21550 74006 13546
21160 2278 74007 13546
23512 34053 81610 15645
23513 34053 81619 15645
23512 34054 81610 15645
23513 34054 81620 15645
23512 34056 81611 15645
23513 34056 81619 15645
23512 34057 81611 15645
23513 34057 81620 15645
23512 34059 81612 15645
23513 34059 81619 15645
23512 34060 81612 15645
23513 34060 81620 15645
23512 34062 81613 15645
23513 34062 81619 15645
23512 34063 81613 15645
23513 34063 81620 15645
23512 34065 81614 15645
23513 34065 81619 15645
23512 34066 81614 15645
23513 34066 81620 15645
23512 34068 81615 15645
23513 34068 81619 15645
23512 34069 81615 15645
23513 34069 81620 15645
23512 34071 81616 15645
23513 34071 81619 15645
23512 34072 81616 15645
23513 34072 81620 15645
23512 34074 81617 15645
23513 34074 81619 15645
23512 34075 81617 15645
23513 34075 81620 15645
23512 34076 81601 15645
23513 34076 81619 15645
23512 34077 81601 15645
23513 34077 81620 15645
23512 34079 81602 15645
23513 34079 81619 15645
23512 34080 81602 15645
23513 34080 81620 15645
23512 34082 81603 15645
23513 34082 81619 15645
23512 34083 81603 15645
23513 34083 81620 15645
23512 34085 81604 15645
23513 34085 81619 15645
23512 34086 81604 15645
23513 34086 81620 15645
23512 34088 81605 15645
23513 34088 81619 15645
23512 34089 81605 15645
23513 34089 81620 15645
23512 34091 81606 15645
23513 34091 81619 15645
23512 34092 81606 15645
23513 34092 81620 15645
23512 34094 81607 15645
23513 34094 81619 15645
23512 34095 81607 15645
23513 34095 81620 15645
23512 34097 81608 15645
23513 34097 81619 15645
23512 34098 81608 15645
23513 34098 81620 15645
23512 34100 81609 15645
23513 34100 81619 15645
23512 34101 81609 15645
23513 34101 81620 15645
23786 37359 82683 15903
23786 37358 82682 15903
23786 37318 82681 15903
23917 38134 83187 16093
23917 38315 83188 16093
23918 38135 83189 16094
23918 38316 83190 16094
23918 38317 83191 16094
24241 389 84471 16499
24241 41611 84472 16499
24621 45507 85931 16846
24621 45532 85932 16846
24710 46795 86197 16934
24709 46795 86189 16934
24710 46794 86196 16934
24709 46794 86189 16934
24710 46793 86195 16934
24709 46793 86189 16934
24710 46792 86194 16934
24709 46792 86189 16934
24710 46791 86193 16934
24709 46791 86189 16934
24710 46790 86192 16934
24709 46790 86189 16934
24710 46789 86191 16934
24709 46789 86189 16934
24710 46788 86190 16934
24709 46788 86189 16934
24710 46787 86197 16934
24709 46787 86188 16934
24710 46786 86196 16934
24709 46786 86188 16934
24710 46785 86195 16934
24709 46785 86188 16934
24710 46784 86194 16934
24709 46784 86188 16934
24710 46783 86193 16934
24709 46783 86188 16934
24710 46782 86192 16934
24709 46782 86188 16934
24710 46781 86191 16934
24709 46781 86188 16934
24710 46737 86190 16934
24709 46737 86188 16934
24739 47026 86287 16979
24739 47025 86286 16979
24739 47010 86285 16979
24865 47927 86706 17119
24866 47927 86711 17119
24865 47982 86706 17119
24866 47982 86712 17119
24865 47983 86706 17119
24866 47983 86713 17119
24865 47984 86706 17119
24866 47984 86714 17119
24865 47985 86706 17119
24866 47985 86715 17119
24865 47986 86707 17119
24866 47986 86711 17119
24865 47987 86707 17119
24866 47987 86712 17119
24865 47988 86707 17119
24866 47988 86713 17119
24865 47989 86707 17119
24866 47989 86714 17119
24865 47990 86707 17119
24866 47990 86715 17119
24865 47991 86708 17119
24866 47991 86711 17119
24865 47992 86708 17119
24866 47992 86712 17119
24865 47993 86708 17119
24866 47993 86713 17119
24865 47994 86708 17119
24866 47994 86714 17119
24865 47995 86708 17119
24866 47995 86715 17119
24865 47996 86709 17119
24866 47996 86711 17119
24865 47997 86709 17119
24866 47997 86712 17119
24865 47998 86709 17119
24866 47998 86713 17119
24865 47999 86709 17119
24866 47999 86714 17119
24865 48000 86709 17119
24866 48000 86715 17119
24865 48001 86710 17119
24866 48001 86711 17119
24865 48002 86710 17119
24866 48002 86712 17119
24865 48003 86710 17119
24866 48003 86713 17119
24865 48004 86710 17119
24866 48004 86714 17119
24865 48005 86710 17119
24866 48005 86715 17119