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 (
    24997, 23951, 23952, 20439, 20287, 21748, 
    23739, 24438, 20436, 23741, 24437, 
    20435, 21271
  ) 
  AND pfv.product_id IN (
    49169, 38552, 3975, 4373, 23481, 36308, 
    43651, 3978, 36717, 43650, 3979, 2047
  ) 
  AND pfv.lang_code = 'vi'

Query time 0.03343

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": "idx_product_feature_variant_id",
          "key_length": "12",
          "used_key_parts": ["product_id", "feature_id", "lang_code"],
          "rows": 159,
          "filtered": 0.506231546,
          "attached_condition": "pfv.feature_id in (24997,23951,23952,20439,20287,21748,23739,24438,20436,23741,24437,20435,21271) and pfv.product_id in (49169,38552,3975,4373,23481,36308,43651,3978,36717,43650,3979,2047) 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
21271 2047 74429 0 Màu Đen Trơn
20439 3975 71521 0 Chuồn chuồn hoa
20436 3978 71511 0 Hoa văn tối
20435 3979 71509 0 Xanh lá
20287 4373 70975 0 Đỏ
21748 23481 76046 0 Màu xanh cổ vịt
23739 36308 82407 1 Đen
23741 36717 82416 2 Vàng
23951 38552 83392 1 Baby Blue
23952 38552 83399 1 Trắng
24437 43650 85227 1 Mẫu 1
24438 43651 85235 1 Mẫu 1
24997 49169 87191 2 2. Nâu đậm