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 (
    12692, 17318, 16930, 13743, 14605, 15472, 
    15475, 13436, 12314, 15476, 13981, 
    12425, 15471, 12177, 15809, 12321, 
    12172
  )

Query time 0.01340

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": 106,
          "filtered": 100,
          "index_condition": "gp.group_id in (12692,17318,16930,13743,14605,15472,15475,13436,12314,15476,13981,12425,15471,12177,15809,12321,12172)"
        }
      },
      {
        "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
19644 14910 68322 12172
19644 6561 68323 12172
19649 14924 68341 12177
19649 14923 68340 12177
19649 14922 68339 12177
19649 14921 68338 12177
19649 6556 68342 12177
19804 15600 68882 12314
19804 6063 68883 12314
19811 15607 68896 12321
19811 6056 68897 12321
19811 32612 81031 12321
19923 16371 69620 12425
19923 5834 69619 12425
20234 18201 70814 12692
20234 4578 70813 12692
21044 21071 73500 13436
21044 2471 73501 13436
21383 22400 74797 13743
21383 22399 74796 13743
21383 22398 74798 13743
21383 1897 74795 13743
21655 1429 75729 13981
21655 23233 75736 13981
21655 23234 75730 13981
21655 23235 75731 13981
21655 23236 75732 13981
21655 23237 75733 13981
21655 23238 75734 13981
21655 23239 75735 13981
22337 25734 78287 14605
22337 25735 78288 14605
22337 401 78289 14605
23357 32616 81033 15471
23357 6057 81032 15471
23357 32617 81034 15471
23357 32618 81033 15472
23357 6058 81032 15472
23357 32619 81034 15472
23357 32624 81033 15475
23357 6061 81032 15475
23357 32625 81034 15475
23357 32626 81033 15476
23357 6062 81032 15476
23357 32627 81034 15476
23699 36312 82206 15809
23700 36312 82208 15809
23699 36382 82206 15809
23700 36382 82217 15809
23699 36383 82206 15809
23700 36383 82218 15809
23699 36384 82206 15809
23700 36384 82219 15809
23699 36385 82206 15809
23700 36385 82220 15809
23699 36386 82206 15809
23700 36386 82221 15809
23699 36387 82206 15809
23700 36387 82222 15809
23699 36388 82206 15809
23700 36388 82223 15809
23699 36389 82206 15809
23700 36389 82224 15809
23699 36390 82206 15809
23700 36390 82225 15809
23699 36391 82206 15809
23700 36391 82209 15809
23699 36392 82206 15809
23700 36392 82210 15809
23699 36393 82206 15809
23700 36393 82211 15809
23699 36394 82206 15809
23700 36394 82212 15809
23699 36395 82206 15809
23700 36395 82213 15809
23699 36396 82206 15809
23700 36396 82214 15809
23699 36397 82206 15809
23700 36397 82215 15809
23699 36398 82206 15809
23700 36398 82216 15809
23699 36399 82207 15809
23700 36399 82217 15809
23699 36400 82207 15809
23700 36400 82218 15809
23699 36401 82207 15809
23700 36401 82219 15809
23699 36402 82207 15809
23700 36402 82220 15809
23699 36403 82207 15809
23700 36403 82221 15809
23699 36404 82207 15809
23700 36404 82222 15809
23699 36405 82207 15809
23700 36405 82223 15809
23699 36406 82207 15809
23700 36406 82224 15809
23699 36407 82207 15809
23700 36407 82225 15809
23699 36408 82207 15809
23700 36408 82208 15809
23699 36409 82207 15809
23700 36409 82209 15809
23699 36410 82207 15809
23700 36410 82210 15809
23699 36411 82207 15809
23700 36411 82211 15809
23699 36412 82207 15809
23700 36412 82212 15809
23699 36413 82207 15809
23700 36413 82213 15809
23699 36414 82207 15809
23700 36414 82214 15809
23699 36415 82207 15809
23700 36415 82215 15809
23699 36416 82207 15809
23700 36416 82216 15809
24703 46748 86164 16930
24703 49306 86163 16930
24703 49305 87193 16930
24703 49307 86162 16930
25095 49879 87603 17318
25096 49879 87608 17318
25095 49877 87603 17318
25096 49877 87606 17318
25095 49878 87603 17318
25096 49878 87607 17318
25095 49880 87603 17318
25096 49880 87609 17318
25095 40824 87603 17318
25096 40824 87605 17318
25095 49881 87603 17318
25096 49881 87610 17318
25095 49882 87604 17318
25096 49882 87605 17318
25095 49883 87604 17318
25096 49883 87606 17318
25095 49884 87604 17318
25096 49884 87607 17318
25095 49885 87604 17318
25096 49885 87608 17318
25095 49886 87604 17318
25096 49886 87609 17318
25095 49887 87604 17318
25096 49887 87610 17318
25095 49888 87603 17318
25096 49888 87611 17318
25095 49889 87603 17318
25096 49889 87612 17318
25095 49890 87603 17318
25096 49890 87613 17318
25095 49891 87604 17318
25096 49891 87611 17318
25095 49892 87604 17318
25096 49892 87612 17318
25095 49893 87604 17318
25096 49893 87613 17318