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 (
    346, 345, 337, 321, 347, 323, 317, 326, 
    314, 327, 313, 324, 332, 316, 341, 333, 
    335, 339, 334, 336
  ) 
  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.00129

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "14.01"
    },
    "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": 20,
        "rows_produced_per_join": 3,
        "filtered": "19.85",
        "index_condition": "(`marketplace`.`ushop_product_prices`.`product_id` in (346,345,337,321,347,323,317,326,314,327,313,324,332,316,341,333,335,339,334,336))",
        "cost_info": {
          "read_cost": "13.61",
          "eval_cost": "0.40",
          "prefix_cost": "14.01",
          "data_read_per_join": "95"
        },
        "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
313 199.95000000
314 349.95000000
316 299.99000000
317 169.99000000
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
339 359.00000000
341 309.00000000
345 209.95000000
346 189.93000000
347 189.95000000