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 (
    12492, 12539, 12752, 12531, 12709, 12759, 
    12533, 12529, 12348, 12713, 12753, 
    12711, 17029, 12758, 12525, 12535, 
    12760, 12710, 12524
  )

Query time 0.00423

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": 75,
          "filtered": 100,
          "index_condition": "gp.group_id in (12492,12539,12752,12531,12709,12759,12533,12529,12348,12713,12753,12711,17029,12758,12525,12535,12760,12710,12524)"
        }
      },
      {
        "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
19838 15668 68984 12348
19838 15667 68983 12348
19838 15666 68982 12348
19838 15665 68981 12348
19838 15664 68980 12348
19838 15663 68985 12348
19838 5962 68979 12348
19990 16555 69870 12492
19990 16554 69869 12492
19990 16553 69868 12492
19990 16552 69867 12492
19990 16551 69866 12492
19990 5589 69871 12492
20028 16762 70016 12524
20028 16761 70015 12524
20028 16760 70014 12524
20028 16759 70013 12524
20028 16758 70017 12524
20028 5483 70012 12524
20029 16767 70022 12525
20029 16766 70021 12525
20029 16765 70020 12525
20029 16764 70019 12525
20029 16763 70023 12525
20029 5481 70018 12525
20033 16786 70045 12529
20033 16785 70044 12529
20033 16784 70043 12529
20033 16783 70042 12529
20033 16782 70041 12529
20033 5474 70046 12529
20035 16796 70057 12531
20035 16795 70056 12531
20035 16794 70055 12531
20035 16793 70054 12531
20035 16792 70058 12531
20035 5469 70053 12531
20037 16809 70072 12533
20037 16808 70071 12533
20037 16807 70070 12533
20037 16806 70069 12533
20037 16805 70068 12533
20037 16804 70067 12533
20037 16803 70073 12533
20037 5464 70066 12533
20039 16817 70082 12535
20039 16816 70081 12535
20039 16815 70080 12535
20039 16814 70083 12535
20039 5459 70079 12535
20043 16831 70100 12539
20043 16830 70099 12539
20043 16829 70098 12539
20043 16828 70097 12539
20043 16827 70101 12539
20043 5447 70096 12539
20251 18241 70870 12709
20251 18240 70869 12709
20251 18239 70868 12709
20251 18238 70867 12709
20251 4468 70871 12709
20252 18242 70872 12710
20252 4467 70873 12710
20253 18243 70874 12711
20253 4466 70875 12711
20255 18245 70878 12713
20255 4464 70879 12713
20294 18323 70995 12752
20294 18322 70994 12752
20294 18321 70993 12752
20294 4365 70996 12752
20295 18326 70999 12753
20295 18325 70998 12753
20295 18324 70997 12753
20295 4364 71000 12753
20300 18341 71019 12758
20300 18340 71018 12758
20300 18339 71017 12758
20300 4359 71020 12758
20301 18344 71023 12759
20301 18343 71022 12759
20301 18342 71021 12759
20301 4358 71024 12759
20302 18347 71027 12760
20302 18346 71026 12760
20302 18345 71025 12760
20302 4357 71028 12760
24779 47280 86429 17029
24779 47319 86430 17029
24779 47320 86431 17029