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 (
    12904, 14674, 13372, 16275, 12193, 14886, 
    13445, 14186, 16271, 13406, 13662, 
    13973, 15398, 14831, 15145, 12249, 
    12996, 14219, 14568
  )

Query time 0.00454

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": 70,
          "filtered": 100,
          "index_condition": "gp.group_id in (12904,14674,13372,16275,12193,14886,13445,14186,16271,13406,13662,13973,15398,14831,15145,12249,12996,14219,14568)"
        }
      },
      {
        "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
19665 14959 68392 12193
19665 14958 68391 12193
19665 14957 68390 12193
19665 14956 68393 12193
19665 6529 68389 12193
19727 15230 86535 12249
19727 15229 68607 12249
19727 47523 86536 12249
19727 6353 68609 12249
19727 47524 86539 12249
19727 47525 86540 12249
19727 47526 86541 12249
19727 47527 86542 12249
20452 18751 71553 12904
20452 18750 71552 12904
20452 3886 71552 12904
20560 19171 71913 12996
20560 3617 71912 12996
20979 20932 73305 13372
20979 2568 73304 13372
21014 21018 73417 13406
21014 21017 73418 13406
21014 2512 73416 13406
21053 21080 73519 13445
21053 2462 73518 13445
21293 22074 74504 13662
21293 22073 74505 13662
21293 2013 74503 13662
21645 1437 75696 13973
21645 23200 75692 13973
21645 23201 75693 13973
21645 23202 75694 13973
21645 23203 75695 13973
21882 1099 76596 14186
21882 24018 76593 14186
21882 24019 76594 14186
21882 24020 76595 14186
21918 24126 76719 14219
21918 1053 76718 14219
22293 471 78116 14568
22293 25445 78116 14568
22293 25446 78117 14568
22293 25447 78118 14568
22293 25448 78119 14568
22293 25449 78120 14568
22293 25450 78121 14568
22293 25451 78122 14568
22293 25452 78123 14568
22293 25453 78124 14568
22293 25462 78125 14568
22412 296 78619 14674
22412 26107 78618 14674
22412 26108 78620 14674
22572 26672 79230 14831
22572 26673 79231 14831
22572 2253 79229 14831
22667 27130 79355 14886
22667 2130 79354 14886
23110 49198 87216 15145
23110 2304 80108 15145
23110 49195 80109 15145
23110 49197 87215 15145
23110 49196 87214 15145
23277 31952 80743 15398
23277 32127 80744 15398
23277 32128 80745 15398
23277 32129 80746 15398
23277 48543 86895 15398
23277 48544 86896 15398
23277 48545 86897 15398
24052 40246 83810 16271
24052 40245 83809 16271
24052 40244 83808 16271
24052 40148 83807 16271
24057 40270 83835 16275
24057 40154 83831 16275
24057 40267 83832 16275
24057 40268 83833 16275
24057 40269 83834 16275