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 (
    13040, 13042, 13031, 15596, 12441, 13995, 
    13985, 15576, 15430, 13078, 13009, 
    15747, 15440, 13983
  )

Query time 0.00745

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": 50,
          "filtered": 100,
          "index_condition": "gp.group_id in (13040,13042,13031,15596,12441,13995,13985,15576,15430,13078,13009,15747,15440,13983)"
        }
      },
      {
        "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
19939 16406 69670 12441
19939 5776 69671 12441
20574 19212 71958 13009
20574 19211 71957 13009
20574 19210 71956 13009
20574 3565 71959 13009
20598 19269 72039 13031
20598 19268 72038 13031
20598 3534 72040 13031
20607 19288 72067 13040
20607 3525 72068 13040
20609 19292 72073 13042
20609 19291 72072 13042
20609 3523 72074 13042
20645 19344 72161 13078
20645 3409 72162 13078
21657 1419 75740 13983
21657 23241 75739 13983
21659 1417 75747 13985
21659 23247 75749 13985
21659 23248 75748 13985
21672 1407 75787 13995
21672 23280 75786 13995
23313 32308 80876 15430
23314 32308 80878 15430
23313 32360 80876 15430
23314 32360 80879 15430
23313 32361 80876 15430
23314 32361 80880 15430
23313 32362 80876 15430
23314 32362 80881 15430
23313 32363 80877 15430
23314 32363 80878 15430
23313 32364 80877 15430
23314 32364 80879 15430
23313 32365 80877 15430
23314 32365 80880 15430
23313 32366 80877 15430
23314 32366 80881 15430
23325 32319 80915 15440
23325 32399 80916 15440
21670 1406 75781 15576
23449 1406 81344 15576
21670 33487 75781 15576
23449 33487 81345 15576
21670 33488 75782 15576
23449 33488 81344 15576
21670 33489 75782 15576
23449 33489 81345 15576
23469 33606 81440 15596
23470 33606 81445 15596
23469 33620 81440 15596
23470 33620 81446 15596
23469 33621 81440 15596
23470 33621 81447 15596
23469 33622 81441 15596
23470 33622 81445 15596
23469 33623 81441 15596
23470 33623 81446 15596
23469 33624 81441 15596
23470 33624 81447 15596
23469 33625 81442 15596
23470 33625 81445 15596
23469 33626 81442 15596
23470 33626 81446 15596
23469 33627 81442 15596
23470 33627 81447 15596
23469 33628 81443 15596
23470 33628 81445 15596
23469 33629 81443 15596
23470 33629 81446 15596
23469 33630 81443 15596
23470 33630 81447 15596
23469 33631 81444 15596
23470 33631 81445 15596
23469 33632 81444 15596
23470 33632 81446 15596
23469 33633 81444 15596
23470 33633 81447 15596
23626 35733 81927 15747
23626 35879 81928 15747
23626 35880 81929 15747