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 (
    20031, 24836, 19843, 19839, 20296, 19844, 
    20298, 20041, 20030, 20293, 20299, 
    20027, 19837, 20043, 20294, 24897, 
    20035
  ) 
  AND pfv.product_id IN (
    5478, 47652, 5957, 5961, 4363, 5956, 
    4361, 5451, 5479, 4366, 4360, 5485, 
    5963, 5447, 4365, 48279, 5469
  ) 
  AND pfv.lang_code = 'vi'

Query time 0.05280

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": 328,
          "filtered": 0.044123333,
          "attached_condition": "pfv.feature_id in (20031,24836,19843,19839,20296,19844,20298,20041,20030,20293,20299,20027,19837,20043,20294,24897,20035) and pfv.product_id in (5478,47652,5957,5961,4363,5956,4361,5451,5479,4366,4360,5485,5963,5447,4365,48279,5469) 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
19837 5963 68974 0 Tâm
19839 5961 68986 0 Be creative
19843 5957 69022 0 Think positive
19844 5956 69032 0 Phát
20027 5485 70007 0 Mẫu 1
20030 5479 70029 0 Mẫu 6
20031 5478 70034 0 Làm việc hết mình
20035 5469 70053 0 Thuận Buồm Xuôi Gió
20041 5451 70087 0 Trắng trơn
20043 5447 70096 0 Tín
20293 4366 70992 0 Người chèo thuyền GIỎI không đến từ VÙNG BIỂN LẶNG SÓNG
20294 4365 70996 0 Cứ đi rồi sẽ đến
20296 4363 71006 0 Chớ thấy SÓNG CẢ mà NGÃ TAY CHÈO
20298 4361 71014 0 Đầu tư
20299 4360 71016 0 Người chèo thuyền GIỎI không đến từ VÙNG BIỂN LẶNG SÓNG
24836 47652 86606 1 Mẫu vẽ hoa sen ngẫu nhiên
24897 48279 86852 2 Hộp 24 Nụ (Tặng kèm 1 Đĩa Đất Đất Nung + 1 Nến Tealight)