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 (
    12558, 12685, 16483, 13933, 12484, 14837, 
    13458, 15895, 13687, 12671, 16438, 
    12669, 15840, 15832, 16422, 13150
  )

Query time 0.01247

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": 82,
          "filtered": 100,
          "index_condition": "gp.group_id in (12558,12685,16483,13933,12484,14837,13458,15895,13687,12671,16438,12669,15840,15832,16422,13150)"
        }
      },
      {
        "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
19982 16530 69837 12484
19982 5598 69838 12484
20063 16859 70146 12558
20063 5381 70147 12558
20211 18139 70728 12669
20211 18138 70727 12669
20211 18137 70726 12669
20211 18136 70725 12669
20211 18135 70724 12669
20211 4793 70729 12669
20213 18147 70738 12671
20213 18146 70737 12671
20213 18145 70736 12671
20213 18144 70735 12671
20213 4787 70739 12671
20227 18194 70800 12685
20227 4581 70799 12685
20720 19586 72391 13150
20720 3198 72392 13150
21066 21109 73560 13458
21066 21108 73559 13458
21066 21107 73558 13458
21066 21106 73557 13458
21066 21105 73556 13458
21066 21104 73555 13458
21066 21103 73554 13458
21066 21102 73553 13458
21066 21101 73552 13458
21066 2449 73561 13458
21318 22124 74579 13687
21318 22123 74580 13687
21318 1988 74578 13687
21601 23042 75536 13933
21601 1526 75537 13933
22577 2259 79245 14837
22577 26682 79246 14837
22577 26683 79247 14837
23709 36466 82262 15832
23709 36578 82271 15832
23709 36579 82272 15832
23709 36580 82273 15832
23709 36581 82274 15832
23709 36582 82275 15832
23709 36583 82276 15832
23709 36584 82277 15832
23709 36585 82278 15832
23709 36586 82279 15832
23709 36587 82280 15832
23709 36588 82281 15832
23709 36589 82263 15832
23709 36590 82264 15832
23709 36591 82265 15832
23709 36592 82266 15832
23709 36593 82267 15832
23709 36594 82268 15832
23709 36595 82269 15832
23709 36596 82270 15832
23717 36494 82333 15840
23717 36641 82334 15840
23777 37097 82616 15895
23777 37157 82625 15895
23777 37158 82626 15895
23777 37159 82627 15895
23777 37160 82628 15895
23777 37161 82629 15895
23777 37162 82630 15895
23777 37163 82631 15895
23777 37164 82632 15895
23777 37165 82617 15895
23777 37166 82618 15895
23777 37167 82619 15895
23777 37168 82620 15895
23777 37169 82621 15895
23777 37170 82622 15895
23777 37171 82623 15895
23777 37172 82624 15895
24191 42343 84766 16422
24191 41102 84292 16422
24191 41103 84293 16422
24191 42344 84766 16438
24191 41134 84292 16438
24191 41135 84293 16438
24225 41423 84401 16483
24225 41459 84402 16483
24225 41460 84403 16483
24225 41461 84404 16483