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 (
    20077, 23485, 21323, 23613, 23614, 23236, 
    21340, 19782, 24746, 20467, 23234, 
    21324, 21893, 25062, 20083
  ) 
  AND pfv.product_id IN (
    5300, 33744, 1980, 35782, 31639, 22172, 
    15462, 47024, 3871, 31636, 1979, 1088, 
    41293, 17259
  ) 
  AND pfv.lang_code = 'vi'

Query time 0.02356

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": 232,
          "filtered": 0.551955044,
          "attached_condition": "pfv.feature_id in (20077,23485,21323,23613,23614,23236,21340,19782,24746,20467,23234,21324,21893,25062,20083) and pfv.product_id in (5300,33744,1980,35782,31639,22172,15462,47024,3871,31636,1979,1088,41293,17259) 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
19782 15462 68795 0 Bánh gạo lứt Yến mạch
20077 5300 70176 7 The Slumber
20083 17259 70234 0 The Mind
20467 3871 71597 0 Mẫu 7
21323 1980 74593 0 Túi Zip
21324 1979 74596 3 Túi Zip
21340 22172 74649 0 Nâu
21893 1088 76637 0 Tròn xanh than hoa đỏ
23234 31636 80580 1 60g
23236 31639 80584 1 70g
23485 33744 81495 1 100g
23613 35782 81876 5 Khắc chữ và hình theo yêu cầu
23614 35782 81880 4 Xanh biển
24746 47024 86302 1 Vàng (Size S)
25062 41293 87451 0 Size S