SELECT 
  product_id, 
  amount 
FROM 
  cscart_warehouses_destination_products_amount 
WHERE 
  product_id IN (
    4340, 2364, 13765, 13826, 13993, 2218, 
    2349, 2178, 2177, 11786, 2827, 2640, 
    2312, 2309, 2310, 2311, 3236, 4344, 
    3221, 3225, 3218, 3246, 3222, 4347, 
    3242, 12675, 11361, 12647, 12880, 12670
  ) 
  AND destination_id = 12 
  AND storefront_id = 0

Query time 0.00031

JSON explain

{
  "query_block": {
    "select_id": 1,
    "table": {
      "table_name": "cscart_warehouses_destination_products_amount",
      "access_type": "range",
      "possible_keys": ["PRIMARY", "idx_storefront_id"],
      "key": "PRIMARY",
      "key_length": "9",
      "used_key_parts": ["product_id", "destination_id", "storefront_id"],
      "rows": 30,
      "filtered": 100,
      "index_condition": "cscart_warehouses_destination_products_amount.destination_id = 12 and cscart_warehouses_destination_products_amount.storefront_id = 0 and cscart_warehouses_destination_products_amount.product_id in (4340,2364,13765,13826,13993,2218,2349,2178,2177,11786,2827,2640,2312,2309,2310,2311,3236,4344,3221,3225,3218,3246,3222,4347,3242,12675,11361,12647,12880,12670)"
    }
  }
}

Result

product_id amount
2177 3
2178 0
2218 39
2309 1
2310 1
2311 1
2312 1
2349 0
2364 453
2640 19
2827 27
3218 0
3221 94
3222 92
3225 1988
3236 1314
3242 2074
3246 24
4340 336
4344 8
4347 2145
11361 17
11786 39
12647 0
12670 0
12675 12
12880 21
13765 251
13826 3
13993 2