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 (
    12587, 13423, 12140, 17236, 13420, 12527, 
    13826, 16131, 13971, 12446, 16571, 
    14711, 15422
  )

Query time 0.01533

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": 69,
          "filtered": 100,
          "index_condition": "gp.group_id in (12587,13423,12140,17236,13420,12527,13826,16131,13971,12446,16571,14711,15422)"
        }
      },
      {
        "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
19608 14795 68198 12140
19608 6614 68197 12140
19944 16416 69685 12446
19944 5743 69686 12446
20031 16776 70033 12527
20031 16775 70032 12527
20031 16774 70031 12527
20031 16773 70030 12527
20031 5478 70034 12527
20103 17726 70361 12587
20103 17725 70362 12587
20103 5150 70360 12587
21028 21055 73468 13420
21028 21054 73467 13420
21028 21053 73466 13420
21028 21052 73465 13420
21028 21051 73464 13420
21028 21050 73469 13420
21028 21049 73462 13420
21028 21048 73461 13420
21028 21047 73460 13420
21028 2498 73463 13420
21031 21058 73475 13423
21031 2495 73474 13423
21478 50075 75180 13826
21478 1748 75181 13826
21643 1439 75689 13971
21643 23198 75688 13971
22457 26321 78799 14711
22457 26320 78798 14711
22457 26319 78797 14711
22457 224 78800 14711
23304 32287 80848 15422
23304 32286 80847 15422
23959 38647 83430 16131
23959 38668 83439 16131
23959 38669 83431 16131
23959 38670 83432 16131
23959 38671 83433 16131
23959 38672 83434 16131
23959 38673 83435 16131
23959 38674 83436 16131
23959 38675 83437 16131
23959 38676 83438 16131
24317 42275 84736 16571
24317 42274 84735 16571
24317 42273 84734 16571
24317 42272 84733 16571
24317 42271 84732 16571
24317 42270 84731 16571
24317 42269 84744 16571
24317 42268 84743 16571
24317 42267 84742 16571
24317 42266 84741 16571
24317 42265 84740 16571
24317 42264 84739 16571
24317 24527 84730 16571
24317 42276 84737 16571
24317 42277 84738 16571
24991 49119 87172 17236
24991 49118 87171 17236
24991 49018 87170 17236
24991 49120 87173 17236
24991 49121 87174 17236