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 (
    304913, 301216, 303191, 300978, 304911, 
    304879, 304816, 303211, 301002, 300966, 
    304912, 304915, 304914, 303127, 301120, 
    303190, 301000, 301217
  ) 
  AND product_prices.lower_limit = 1 
  AND product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  product_prices.product_id

Query time 0.00098

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "18.85"
    },
    "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": 30,
        "rows_produced_per_join": 2,
        "filtered": "10.00",
        "index_condition": "(`goimagine`.`product_prices`.`product_id` in (304913,301216,303191,300978,304911,304879,304816,303211,301002,300966,304912,304915,304914,303127,301120,303190,301000,301217))",
        "cost_info": {
          "read_cost": "18.55",
          "eval_cost": "0.30",
          "prefix_cost": "18.85",
          "data_read_per_join": "71"
        },
        "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
300966 15.00000000
300978 0.00000000
301000 25.00000000
301002 30.00000000
301120 10.00000000
301216 5.00000000
301217 25.00000000
303127 15.00000000
303190 25.00000000
303191 5.00000000
303211 25.00000000
304816 15.00000000
304879 20.00000000
304911 20.00000000
304912 5.00000000
304913 5.00000000
304914 5.00000000
304915 15.00000000