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 (
    12530, 12493, 12534, 12491, 12527, 12353, 
    12349, 12532, 15747, 12538, 12754, 
    12354, 12756, 12537, 12526, 12751, 
    12757, 12490, 12523, 12494, 12347
  )

Query time 0.00421

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": 100,
          "filtered": 100,
          "index_condition": "gp.group_id in (12530,12493,12534,12491,12527,12353,12349,12532,15747,12538,12754,12354,12756,12537,12526,12751,12757,12490,12523,12494,12347)"
        }
      },
      {
        "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
19988 16545 69858 12490
19988 16544 69857 12490
19988 16543 69856 12490
19988 16542 69855 12490
19988 16541 69854 12490
19988 5591 69859 12490
19989 16550 69864 12491
19989 16549 69863 12491
19989 16548 69862 12491
19989 16547 69861 12491
19989 16546 69860 12491
19989 5590 69865 12491
19991 16560 69876 12493
19991 16559 69875 12493
19991 16558 69874 12493
19991 16557 69873 12493
19991 16556 69872 12493
19991 5588 69877 12493
19992 16565 69882 12494
19992 16564 69881 12494
19992 16563 69880 12494
19992 16562 69879 12494
19992 16561 69878 12494
19992 5587 69883 12494
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
20034 16791 70051 12530
20034 16790 70050 12530
20034 16789 70049 12530
20034 16788 70048 12530
20034 16787 70052 12530
20034 5472 70047 12530
20036 16802 70064 12532
20036 16801 70063 12532
20036 16800 70062 12532
20036 16799 70061 12532
20036 16798 70060 12532
20036 16797 70065 12532
20036 5467 70059 12532
20038 16813 70077 12534
20038 16812 70076 12534
20038 16811 70075 12534
20038 16810 70078 12534
20038 5462 70074 12534
20041 16821 70088 12537
20041 16820 70089 12537
20041 5451 70087 12537
20042 16826 70094 12538
20042 16825 70093 12538
20042 16824 70092 12538
20042 16823 70091 12538
20042 16822 70095 12538
20042 5448 70090 12538
20293 18320 70991 12751
20293 4366 70992 12751
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
23626 35733 81927 15747
23626 35879 81928 15747
23626 35880 81929 15747