SELECT 
  ushop_product_prices.product_id, 
  MIN(
    IF(
      ushop_product_prices.percentage_discount = 0, 
      ushop_product_prices.price, 
      ushop_product_prices.price - (
        ushop_product_prices.price * ushop_product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  ushop_product_prices 
WHERE 
  ushop_product_prices.product_id IN (
    337, 321, 323, 326, 327, 324, 332, 341, 
    333, 335, 339, 334, 336, 340, 343, 338, 
    342
  ) 
  AND ushop_product_prices.lower_limit = 1 
  AND ushop_product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  ushop_product_prices.product_id

Query time 0.00069

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "11.91"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "ushop_product_prices",
        "access_type": "range",
        "possible_keys": [
          "usergroup",
          "product_id",
          "lower_limit",
          "usergroup_id"
        ],
        "key": "product_id",
        "used_key_parts": [
          "product_id"
        ],
        "key_length": "3",
        "rows_examined_per_scan": 17,
        "rows_produced_per_join": 3,
        "filtered": "19.85",
        "index_condition": "(`marketplace`.`ushop_product_prices`.`product_id` in (337,321,323,326,327,324,332,341,333,335,339,334,336,340,343,338,342))",
        "cost_info": {
          "read_cost": "11.57",
          "eval_cost": "0.34",
          "prefix_cost": "11.91",
          "data_read_per_join": "80"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`marketplace`.`ushop_product_prices`.`lower_limit` = 1) and (`marketplace`.`ushop_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
321 159.95000000
323 419.00000000
324 229.00000000
326 79.00000000
327 369.00000000
332 180.00000000
333 120.00000000
334 220.00000000
335 180.00000000
336 139.99000000
337 38.99000000
338 269.00000000
339 359.00000000
340 220.00000000
341 309.00000000
342 779.00000000
343 599.00000000