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 (
    20286, 23725, 24498, 20275, 23732, 24633, 
    24098, 24497, 24097, 24992, 24095, 
    24770, 22237, 24772, 24792, 24496, 
    22129, 24773, 24093, 21271
  ) 
  AND pfv.product_id IN (
    4374, 36521, 44573, 4385, 36299, 45597, 
    40529, 44571, 40534, 44572, 40533, 
    47257, 25162, 47258, 47393, 44570, 
    24788, 47259, 40531, 2047
  ) 
  AND pfv.lang_code = 'vi'

Query time 0.07568

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": "product_id",
          "key_length": "3",
          "used_key_parts": ["product_id"],
          "rowid_filter": {
            "range": {
              "key": "fl",
              "used_key_parts": ["feature_id", "lang_code"]
            },
            "rows": 194,
            "selectivity_pct": 0.122626482
          },
          "rows": 92,
          "filtered": 0.122626483,
          "index_condition": "pfv.product_id in (4374,36521,44573,4385,36299,45597,40529,44571,40534,44572,40533,47257,25162,47258,47393,44570,24788,47259,40531,2047)",
          "attached_condition": "pfv.feature_id in (20286,23725,24498,20275,23732,24633,24098,24497,24097,24992,24095,24770,22237,24772,24792,24496,22129,24773,24093,21271) and pfv.lang_code = 'vi'"
        }
      },
      {
        "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
21271 2047 74429 0 Màu Đen Trơn
20286 4374 70972 0 Đỏ
20275 4385 70939 0 Đỏ
22129 24788 77472 0 Màu tím
22237 25162 77917 0 Màu xanh dương
23732 36299 82381 1 Màu xám
23725 36521 82351 1 Tím
24098 40529 83974 1 Mẫu 1
24093 40531 83944 1 Mẫu 1
24095 40533 83954 1 Mẫu 1
24097 40534 83971 1 Mẫu 1
24496 44570 85457 1 Vải linen
24497 44571 85459 1 Màu nâu
24992 44572 87175 1 Hoa màu xanh
24498 44573 85461 1 Cánh hoa đen
24633 45597 85984 1 Nâu
24770 47257 86391 1 Trắng be
24772 47258 86401 1 Nâu
24773 47259 86406 1 Tím
24792 47393 86492 1 Summer by eM (Xanh rực rỡ)