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 (
    20727, 23469, 23470, 21042, 19773, 20726, 
    20621, 22112, 24288, 20728, 22410, 
    21027, 23707, 21696, 19973, 20105, 
    24749, 24263
  ) 
  AND pfv.product_id IN (
    3187, 33606, 2473, 6197, 3189, 3465, 
    735, 41945, 3186, 298, 2499, 36574, 
    1375, 5656, 5146, 47082, 50395
  ) 
  AND pfv.lang_code = 'vi'

Query time 0.02130

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": 340,
          "filtered": 0.043319363,
          "attached_condition": "pfv.feature_id in (20727,23469,23470,21042,19773,20726,20621,22112,24288,20728,22410,21027,23707,21696,19973,20105,24749,24263) and pfv.product_id in (3187,33606,2473,6197,3189,3465,735,41945,3186,298,2499,36574,1375,5656,5146,47082,50395) 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
19773 6197 68776 0 Tảo xoắn
19973 5656 69803 0 70g
20105 5146 70366 0 50g
20621 3465 72104 0 Hình tháp
20726 3189 72404 0 200g
20727 3187 72412 0 Vẽ theo yêu cầu
20728 3186 72414 0 Hoa Hồng
21027 2499 73455 0 Trắng
21042 2473 73497 0 30ml
21696 1375 75872 0 Size S
22112 735 77415 0 Lót ly nhỏ kem và sọc xanh tím
22410 298 78609 0 Mệnh Thổ
23469 33606 81440 1 Chó con 1
23470 33606 81445 1 Xanh lam
23707 36574 82259 2 A3
24263 50395 84552 1 ARIES - Bạch Dương
24288 41945 84622 1 Bạch Dương
24749 47082 86309 1 Màu nâu