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 (
    12497, 12189, 16933, 12501, 12210, 13605, 
    12506, 13612, 12193, 14886, 12188, 
    13606, 12187, 13561, 14887
  )

Query time 0.00879

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": 62,
          "filtered": 100,
          "index_condition": "gp.group_id in (12497,12189,16933,12501,12210,13605,12506,13612,12193,14886,12188,13606,12187,13561,14887)"
        }
      },
      {
        "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
19659 14946 68374 12187
19659 6535 68373 12187
19660 14947 68376 12188
19660 6534 68375 12188
19661 14949 68378 12189
19661 14948 68379 12189
19661 6533 68377 12189
19665 14959 68392 12193
19665 14958 68391 12193
19665 14957 68390 12193
19665 14956 68393 12193
19665 6529 68389 12193
19682 14981 68432 12210
19682 6466 68431 12210
19997 16589 69898 12497
19997 16587 69897 12497
19997 16586 69896 12497
19997 5568 69896 12497
20002 16602 69911 12501
20002 16601 69910 12501
20002 5555 69912 12501
20007 16612 69926 12506
20007 16611 69925 12506
20007 5550 69927 12506
21176 21601 74066 13561
21176 21600 74065 13561
21176 2234 74067 13561
21223 21770 74235 13605
21223 21769 74234 13605
21223 21768 74233 13605
21223 2138 74236 13605
21224 21773 74239 13606
21224 21772 74238 13606
21224 21771 74237 13606
21224 2137 74240 13606
21230 21791 74263 13612
21230 21790 74262 13612
21230 21789 74261 13612
21230 2131 74264 13612
22667 27130 79355 14886
22667 2130 79354 14886
22668 2129 79356 14887
22668 27133 79357 14887
24707 46773 86179 16933
24708 46773 86180 16933
24707 46772 86178 16933
24708 46772 86187 16933
24707 46771 86178 16933
24708 46771 86186 16933
24707 46770 86178 16933
24708 46770 86185 16933
24707 46769 86178 16933
24708 46769 86184 16933
24707 46768 86178 16933
24708 46768 86183 16933
24707 46767 86178 16933
24708 46767 86182 16933
24707 46766 86178 16933
24708 46766 86181 16933
24707 46739 86178 16933
24708 46739 86180 16933
24707 46780 86179 16933
24708 46780 86187 16933
24707 46779 86179 16933
24708 46779 86186 16933
24707 46778 86179 16933
24708 46778 86185 16933
24707 46777 86179 16933
24708 46777 86184 16933
24707 46776 86179 16933
24708 46776 86183 16933
24707 46775 86179 16933
24708 46775 86182 16933
24707 46774 86179 16933
24708 46774 86181 16933