SELECT 
  product_prices.product_id, 
  MIN(
    IF(
      product_prices.percentage_discount = 0, 
      product_prices.price, 
      product_prices.price - (
        product_prices.price * product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  product_prices 
WHERE 
  product_prices.product_id IN (
    322386, 322409, 323703, 323719, 323720, 
    323729, 323737, 323745, 324479, 324482, 
    324483, 324505, 324516, 325794, 325832, 
    326336, 326343, 326355, 326361, 327103, 
    327115, 327664, 327681, 327714
  ) 
  AND product_prices.lower_limit = 1 
  AND product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  product_prices.product_id

Query time 0.00644

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "18.50"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "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": 24,
        "rows_produced_per_join": 2,
        "filtered": "10.00",
        "index_condition": "(`goimagine`.`product_prices`.`product_id` in (322386,322409,323703,323719,323720,323729,323737,323745,324479,324482,324483,324505,324516,325794,325832,326336,326343,326355,326361,327103,327115,327664,327681,327714))",
        "cost_info": {
          "read_cost": "18.26",
          "eval_cost": "0.24",
          "prefix_cost": "18.50",
          "data_read_per_join": "57"
        },
        "used_columns": [
          "id",
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`goimagine`.`product_prices`.`lower_limit` = 1) and (`goimagine`.`product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
322386 15.00000000
322409 18.00000000
323703 18.00000000
323719 18.00000000
323720 15.00000000
323729 18.00000000
323737 18.00000000
323745 18.00000000
324479 18.00000000
324482 18.00000000
324483 18.00000000
324505 18.00000000
324516 18.00000000
325794 18.00000000
325832 18.00000000
326336 20.00000000
326343 18.00000000
326355 18.00000000
326361 18.00000000
327103 18.00000000
327115 18.00000000
327664 18.00000000
327681 18.00000000
327714 18.00000000