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 (
    14225, 12975, 12907, 13098, 13929, 16458, 
    12426, 12544, 13954, 12424, 13282, 
    12545, 14673, 16933, 12501, 12905, 
    12977, 17140, 14669
  )

Query time 0.03171

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": 129,
          "filtered": 100,
          "index_condition": "gp.group_id in (14225,12975,12907,13098,13929,16458,12426,12544,13954,12424,13282,12545,14673,16933,12501,12905,12977,17140,14669)"
        }
      },
      {
        "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
19922 16370 69618 12424
19922 5835 69617 12424
19924 16372 69622 12426
19924 5833 69621 12426
20002 16602 69911 12501
20002 16601 69910 12501
20002 5555 69912 12501
20048 16840 70114 12544
20048 5424 70115 12544
20049 16841 70116 12545
20049 5421 70117 12545
20454 18755 71557 12905
20454 18754 71556 12905
20454 3885 71556 12905
20457 18760 71563 12907
20457 18759 71564 12907
20457 3881 71562 12907
20536 19032 71825 12975
20536 19031 71824 12975
20536 19030 71823 12975
20536 3664 71826 12975
20539 19078 71843 12977
20539 19074 71842 12977
20539 19073 71841 12977
20539 19072 71840 12977
20539 19071 71839 12977
20539 3662 71839 12977
20665 19394 72227 13098
20665 19389 72226 13098
20665 19388 72225 13098
20665 19387 72224 13098
20665 19386 72223 13098
20665 19385 72222 13098
20881 20686 72972 13282
20881 2910 72973 13282
21597 23031 75522 13929
21597 1534 75521 13929
21626 1481 75637 13954
21626 23162 75635 13954
21626 23163 75636 13954
21924 24140 76738 14225
21924 24139 76737 14225
21924 1042 76739 14225
22406 306 78572 14669
22406 26058 78573 14669
22406 26059 78574 14669
22406 26060 78575 14669
22406 26061 78576 14669
22406 26066 78577 14669
22411 26102 78612 14673
22411 26101 78611 14673
22411 26100 78610 14673
22411 26103 78613 14673
22411 26104 78617 14673
22411 26105 78615 14673
22411 26106 78616 14673
22411 297 78614 14673
24202 41249 84334 16458
24202 41248 84333 16458
24202 41247 84332 16458
24202 41246 84331 16458
24202 41245 84330 16458
24202 41231 84329 16458
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
24889 48184 86828 17140
24890 48184 86837 17140
24889 48185 86828 17140
24890 48185 86838 17140
24889 48183 86827 17140
24890 48183 86839 17140
24889 48182 86827 17140
24890 48182 86838 17140
24889 48181 86836 17140
24890 48181 86839 17140
24889 48180 86836 17140
24890 48180 86838 17140
24889 48179 86836 17140
24890 48179 86837 17140
24889 48151 86827 17140
24890 48151 86837 17140
24889 48186 86828 17140
24890 48186 86839 17140
24889 48187 86829 17140
24890 48187 86837 17140
24889 48188 86829 17140
24890 48188 86838 17140
24889 48189 86829 17140
24890 48189 86839 17140
24889 48190 86830 17140
24890 48190 86837 17140
24889 48191 86830 17140
24890 48191 86838 17140
24889 48192 86830 17140
24890 48192 86839 17140
24889 48193 86831 17140
24890 48193 86837 17140
24889 48194 86831 17140
24890 48194 86838 17140
24889 48195 86831 17140
24890 48195 86839 17140
24889 48196 86832 17140
24890 48196 86837 17140
24889 48197 86832 17140
24890 48197 86838 17140
24889 48198 86832 17140
24890 48198 86839 17140
24889 48199 86833 17140
24890 48199 86837 17140
24889 48200 86833 17140
24890 48200 86838 17140
24889 48201 86833 17140
24890 48201 86839 17140
24889 48202 86834 17140
24890 48202 86837 17140
24889 48203 86834 17140
24890 48203 86838 17140
24889 48204 86834 17140
24890 48204 86839 17140
24889 48205 86835 17140
24890 48205 86837 17140
24889 48206 86835 17140
24890 48206 86838 17140
24889 48207 86835 17140
24890 48207 86839 17140