SELECT 
  pfv.feature_id, 
  pfv.product_id, 
  pfv.variant_id, 
  fv.position, 
  fvd.variant 
FROM 
  cscart_product_features_values AS pfv 
  INNER JOIN cscart_product_feature_variants AS fv ON pfv.feature_id = fv.feature_id 
  AND pfv.variant_id = fv.variant_id 
  INNER JOIN cscart_product_feature_variant_descriptions AS fvd ON pfv.variant_id = fvd.variant_id 
  AND fvd.lang_code = 'vi' 
WHERE 
  pfv.feature_id IN (
    21340, 19782, 24746, 20467, 21324, 25062, 
    20083, 21322, 22035, 19938, 24745, 
    20462, 24974, 24443, 20885, 20891
  ) 
  AND pfv.product_id IN (
    22172, 15462, 47024, 3871, 1979, 41293, 
    17259, 1981, 855, 5786, 47020, 3876, 
    48980, 43824, 2873, 2854
  ) 
  AND pfv.lang_code = 'vi'

Query time 0.05652

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "table": {
          "table_name": "pfv",
          "access_type": "range",
          "possible_keys": [
            "PRIMARY",
            "fl",
            "variant_id",
            "lang_code",
            "product_id",
            "fpl",
            "idx_product_feature_variant_id"
          ],
          "key": "PRIMARY",
          "key_length": "6",
          "used_key_parts": ["feature_id", "product_id"],
          "rows": 280,
          "filtered": 0.03730952,
          "attached_condition": "pfv.feature_id in (21340,19782,24746,20467,21324,25062,20083,21322,22035,19938,24745,20462,24974,24443,20885,20891) and pfv.product_id in (22172,15462,47024,3871,1979,41293,17259,1981,855,5786,47020,3876,48980,43824,2873,2854) and pfv.lang_code = 'vi'",
          "using_index": true
        }
      },
      {
        "table": {
          "table_name": "fv",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY", "feature_id"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["variant_id"],
          "ref": ["dev_db.pfv.variant_id"],
          "rows": 1,
          "filtered": 100,
          "attached_condition": "fv.feature_id = pfv.feature_id"
        }
      },
      {
        "table": {
          "table_name": "fvd",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "9",
          "used_key_parts": ["variant_id", "lang_code"],
          "ref": ["dev_db.pfv.variant_id", "const"],
          "rows": 1,
          "filtered": 100,
          "index_condition": "fvd.lang_code = 'vi'"
        }
      }
    ]
  }
}

Result

feature_id product_id variant_id position variant
19782 15462 68795 0 Bánh gạo lứt Yến mạch
19938 5786 69669 0 Matcha, Ruby, Cacao
20083 17259 70234 0 The Mind
20462 3876 71574 0 Trâu con
20467 3871 71597 0 Mẫu 7
20885 2873 72989 0 Xám nhạt
20891 2854 73006 0 Cây nấm thần kỳ.
21322 1981 74590 0 Túi Zip
21324 1979 74596 3 Túi Zip
21340 22172 74649 0 Nâu
22035 855 77117 1 6mm
24443 43824 85249 1 Trà xanh Shan tuyết 600 tuổi
24745 47020 86300 3 Vàng - Size S
24746 47024 86302 1 Vàng (Size S)
24974 48980 87098 1 Gió Mát
25062 41293 87451 0 Size S