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 (
    21341, 24913, 21338, 24568, 24569, 24552, 
    24551, 24566, 24567, 22034, 24459, 
    24460, 21655, 24850, 20318, 23490, 
    20454, 22557, 21183, 19763, 20452, 
    22924, 24463
  ) 
  AND pfv.product_id IN (
    1942, 48503, 1946, 44946, 44943, 44944, 
    44947, 44945, 856, 6282, 6284, 1429, 
    6211, 4305, 33716, 3885, 51, 33717, 
    21680, 6212, 3886, 28165, 5621, 6286
  ) 
  AND pfv.lang_code = 'vi'

Query time 0.03008

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": 573,
            "selectivity_pct": 0.362190589
          },
          "rows": 146,
          "filtered": 3.236518621,
          "index_condition": "pfv.product_id in (1942,48503,1946,44946,44943,44944,44947,44945,856,6282,6284,1429,6211,4305,33716,3885,51,33717,21680,6212,3886,28165,5621,6286)",
          "attached_condition": "pfv.feature_id in (21341,24913,21338,24568,24569,24552,24551,24566,24567,22034,24459,24460,21655,24850,20318,23490,20454,22557,21183,19763,20452,22924,24463) 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
22557 51 79199 0 Xanh
22034 856 77111 1 12mm
21655 1429 75729 0 Màu xanh dương (70 x 70 cm)
21341 1942 74652 0 Trắng
21338 1946 74646 0 Trắng
20454 3885 71556 0 Size 37
20452 3886 71552 0 Size 37
20318 4305 71072 0 Size lớn
24850 5621 86656 1 34
24850 6211 86656 1 34
19763 6212 68748 0 40
24459 6282 85305 1 Hoa sao nhí
24460 6284 85317 1 Thiên nga bay từ trái sang
24463 6286 85326 1 Mẫu 1
21183 21680 74109 0 Size M
22924 28165 79925 1 Vàng - be
23490 33716 81505 1 Size XS
23490 33717 81505 1 Size XS
24551 44943 85626 1 Trắng
24552 44943 85634 1 Size S
24567 44944 85746 1 Size S
24566 44944 85738 1 Trắng
24569 44945 85757 1 Size S
24568 44945 85749 1 Trắng
24569 44946 85757 1 Size S
24568 44946 85749 1 Trắng
24569 44947 85757 1 Size S
24551 44947 85626 1 Trắng
24913 48503 86882 0 size S