SELECT 
  v.variant_id, 
  v.product_id, 
  vd.variant, 
  vf.position, 
  vf.color 
FROM 
  cscart_product_features_values v 
  LEFT JOIN cscart_product_feature_variant_descriptions vd ON v.variant_id = vd.variant_id 
  AND vd.lang_code = 'en' 
  LEFT JOIN cscart_product_feature_variants vf ON v.variant_id = vf.variant_id 
WHERE 
  1 
  AND v.feature_id = 1330 
  AND v.product_id IN (
    '40374', '40421', '40420', '40419', 
    '40418', '40417', '40416', '40415', 
    '40414', '40413', '40412', '40411', 
    '40410', '40409', '40408', '40407', 
    '40406', '40405', '40404', '40403', 
    '40402', '40401', '40400', '40399'
  )

Query time 0.00151

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "22.09"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "v",
          "access_type": "range",
          "possible_keys": [
            "PRIMARY",
            "fl",
            "product_id",
            "fpl",
            "idx_product_feature_variant_id"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "feature_id",
            "product_id"
          ],
          "key_length": "6",
          "rows_examined_per_scan": 24,
          "rows_produced_per_join": 24,
          "filtered": "100.00",
          "using_index": true,
          "cost_info": {
            "read_cost": "2.89",
            "eval_cost": "2.40",
            "prefix_cost": "5.29",
            "data_read_per_join": "18K"
          },
          "used_columns": [
            "feature_id",
            "product_id",
            "variant_id"
          ],
          "attached_condition": "((`cscartdb`.`v`.`feature_id` = 1330) and (`cscartdb`.`v`.`product_id` in ('40374','40421','40420','40419','40418','40417','40416','40415','40414','40413','40412','40411','40410','40409','40408','40407','40406','40405','40404','40403','40402','40401','40400','40399')))"
        }
      },
      {
        "table": {
          "table_name": "vd",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "variant_id",
            "lang_code"
          ],
          "key_length": "9",
          "ref": [
            "cscartdb.v.variant_id",
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 24,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "6.00",
            "eval_cost": "2.40",
            "prefix_cost": "13.69",
            "data_read_per_join": "72K"
          },
          "used_columns": [
            "variant_id",
            "variant",
            "lang_code"
          ]
        }
      },
      {
        "table": {
          "table_name": "vf",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "variant_id"
          ],
          "key_length": "3",
          "ref": [
            "cscartdb.v.variant_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 24,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "6.00",
            "eval_cost": "2.40",
            "prefix_cost": "22.09",
            "data_read_per_join": "27K"
          },
          "used_columns": [
            "variant_id",
            "color",
            "position"
          ]
        }
      }
    ]
  }
}

Result

variant_id product_id variant position color
5296 40374 6" 0 #000000
5297 40399 7" 1 #000000
5298 40400 8" 2 #000000
5296 40401 6" 0 #000000
5297 40402 7" 1 #000000
5298 40403 8" 2 #000000
5296 40404 6" 0 #000000
5297 40405 7" 1 #000000
5298 40406 8" 2 #000000
5296 40407 6" 0 #000000
5297 40408 7" 1 #000000
5298 40409 8" 2 #000000
5296 40410 6" 0 #000000
5297 40411 7" 1 #000000
5298 40412 8" 2 #000000
5296 40413 6" 0 #000000
5297 40414 7" 1 #000000
5298 40415 8" 2 #000000
5296 40416 6" 0 #000000
5297 40417 7" 1 #000000
5298 40418 8" 2 #000000
5296 40419 6" 0 #000000
5297 40420 7" 1 #000000
5298 40421 8" 2 #000000