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 (
    12510, 12500, 12504, 15474, 13262, 12718, 
    17267, 16103, 15669, 13280, 12719, 
    12158, 12692, 17318, 13446, 12502, 
    13413, 12717, 15545
  )

Query time 0.00316

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": 92,
          "filtered": 100,
          "index_condition": "gp.group_id in (12510,12500,12504,15474,13262,12718,17267,16103,15669,13280,12719,12158,12692,17318,13446,12502,13413,12717,15545)"
        }
      },
      {
        "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
19627 14825 68244 12158
19627 14824 68243 12158
19627 14823 68242 12158
19627 14822 68241 12158
19627 6578 68245 12158
20001 16600 69908 12500
20001 16599 69907 12500
20001 5556 69909 12500
20003 16604 69914 12502
20003 16603 69913 12502
20003 5554 69915 12502
20005 16608 69920 12504
20005 16607 69919 12504
20005 5552 69921 12504
20011 16620 69938 12510
20011 16619 69937 12510
20011 5546 69939 12510
20234 18201 70814 12692
20234 4578 70813 12692
20259 18255 70892 12717
20259 18254 70891 12717
20259 18253 70890 12717
20259 18252 70889 12717
20259 4441 70893 12717
20260 18257 70895 12718
20260 18256 70894 12718
20260 4440 70896 12718
20261 18259 70898 12719
20261 18258 70897 12719
20261 4439 70899 12719
20861 20645 72911 13262
20861 2920 72912 13262
20879 20682 72966 13280
20879 2932 72967 13280
21021 21032 73438 13413
21021 21031 73439 13413
21021 2505 73437 13413
21054 21081 73521 13446
21054 2461 73520 13446
23357 32622 81033 15474
23357 6060 81032 15474
23357 32623 81034 15474
23415 33177 81215 15545
23415 33235 81223 15545
23415 33234 81222 15545
23415 33233 81221 15545
23415 33232 81220 15545
23415 33231 81219 15545
23415 33230 81218 15545
23415 33229 81217 15545
23415 33228 81216 15545
23536 48996 81680 15669
23537 48996 81684 15669
23536 48995 81680 15669
23537 48995 81683 15669
23536 48994 81679 15669
23537 48994 81683 15669
23536 35249 81679 15669
23537 35249 81684 15669
23536 35250 81680 15669
23537 35250 81681 15669
23536 35251 81680 15669
23537 35251 81682 15669
23536 48992 81679 15669
23537 48992 81681 15669
23536 48993 81679 15669
23537 48993 81682 15669
23927 38152 83214 16103
23927 38332 83215 16103
25022 49421 87282 17267
25021 49421 87278 17267
25022 49420 87281 17267
25021 49420 87280 17267
25022 27357 87281 17267
25021 27357 87278 17267
25022 49419 87281 17267
25021 49419 87279 17267
25022 49423 87282 17267
25021 49423 87280 17267
25022 49422 87282 17267
25021 49422 87279 17267
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