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 (
    12527, 17087, 12353, 12349, 12754, 12354, 
    12756, 12537, 12526, 12751, 12757, 
    12523, 12347, 12539, 12752, 17145, 
    12531
  )

Query time 0.02071

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": 78,
          "filtered": 100,
          "index_condition": "gp.group_id in (12527,17087,12353,12349,12754,12354,12756,12537,12526,12751,12757,12523,12347,12539,12752,17145,12531)"
        }
      },
      {
        "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
19837 15662 68977 12347
19837 15661 68976 12347
19837 15660 68975 12347
19837 15659 68978 12347
19837 5963 68974 12347
19839 15677 68994 12349
19839 15676 68993 12349
19839 15675 68992 12349
19839 15674 68991 12349
19839 15673 68990 12349
19839 15672 68989 12349
19839 15671 68988 12349
19839 15670 68987 12349
19839 15669 68995 12349
19839 5961 68986 12349
19843 15709 69030 12353
19843 15708 69029 12353
19843 15707 69028 12353
19843 15706 69027 12353
19843 15705 69026 12353
19843 15704 69025 12353
19843 15703 69024 12353
19843 15702 69023 12353
19843 15701 69031 12353
19843 5957 69022 12353
19844 15716 69038 12354
19844 15715 69037 12354
19844 15714 69036 12354
19844 15713 69035 12354
19844 15712 69034 12354
19844 15711 69033 12354
19844 15710 69039 12354
19844 5956 69032 12354
20027 16757 70010 12523
20027 16756 70009 12523
20027 16755 70008 12523
20027 16754 70011 12523
20027 5485 70007 12523
20030 16772 70028 12526
20030 16771 70027 12526
20030 16770 70026 12526
20030 16769 70025 12526
20030 16768 70024 12526
20030 5479 70029 12526
20031 16776 70033 12527
20031 16775 70032 12527
20031 16774 70031 12527
20031 16773 70030 12527
20031 5478 70034 12527
20035 16796 70057 12531
20035 16795 70056 12531
20035 16794 70055 12531
20035 16793 70054 12531
20035 16792 70058 12531
20035 5469 70053 12531
20041 16821 70088 12537
20041 16820 70089 12537
20041 5451 70087 12537
20043 16831 70100 12539
20043 16830 70099 12539
20043 16829 70098 12539
20043 16828 70097 12539
20043 16827 70101 12539
20043 5447 70096 12539
20293 18320 70991 12751
20293 4366 70992 12751
20294 18323 70995 12752
20294 18322 70994 12752
20294 18321 70993 12752
20294 4365 70996 12752
20296 18331 71005 12754
20296 18330 71004 12754
20296 18329 71003 12754
20296 18328 71002 12754
20296 18327 71001 12754
20296 4363 71006 12754
20298 18337 71013 12756
20298 18336 71012 12756
20298 18335 71011 12756
20298 4361 71014 12756
20299 18338 71015 12757
20299 4360 71016 12757
24836 47652 86606 17087
24836 47685 86607 17087
24836 47686 86608 17087
24897 48223 86851 17145
24897 48279 86852 17145
24897 48280 86853 17145