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 (
    218811, 218812, 218820, 243859, 218828, 
    218844, 218843, 218826, 218821, 242812, 
    276563, 276572, 218819, 218822, 218814, 
    218823, 219554, 259988, 219549, 222606, 
    224235, 219658, 225208, 225797, 226870, 
    218824, 218813, 219139, 218816, 218815
  ) 
  AND product_prices.lower_limit = 1 
  AND product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  product_prices.product_id

Query time 0.00265

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "24.92"
    },
    "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 (218811,218812,218820,243859,218828,218844,218843,218826,218821,242812,276563,276572,218819,218822,218814,218823,219554,259988,219549,222606,224235,219658,225208,225797,226870,218824,218813,219139,218816,218815))",
        "cost_info": {
          "read_cost": "24.62",
          "eval_cost": "0.30",
          "prefix_cost": "24.92",
          "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
218811 17.25000000
218812 17.25000000
218813 24.00000000
218814 13.00000000
218815 21.00000000
218816 30.00000000
218819 19.00000000
218820 18.00000000
218821 17.50000000
218822 13.00000000
218823 13.00000000
218824 21.00000000
218826 11.00000000
218828 17.00000000
218843 30.00000000
218844 17.00000000
219139 24.00000000
219549 20.00000000
219554 18.00000000
219658 30.00000000
222606 17.00000000
224235 17.00000000
225208 22.00000000
225797 22.00000000
226870 21.00000000
242812 10.00000000
243859 29.00000000
259988 30.00000000
276563 30.00000000
276572 13.00000000