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 (
    505, 1345, 15944, 66569, 19922, 71647, 
    167573, 46111, 46117, 156908, 46118, 
    246604, 253450, 263753, 247140, 247025, 
    247846, 46462, 204749, 246605, 257457, 
    257455, 257456, 247613
  ) 
  AND product_prices.lower_limit = 1 
  AND product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  product_prices.product_id

Query time 0.00282

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "16.97"
    },
    "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 (505,1345,15944,66569,19922,71647,167573,46111,46117,156908,46118,246604,253450,263753,247140,247025,247846,46462,204749,246605,257457,257455,257456,247613))",
        "cost_info": {
          "read_cost": "16.73",
          "eval_cost": "0.24",
          "prefix_cost": "16.97",
          "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
505 49.95000000
1345 44.95000000
15944 44.95000000
19922 39.95000000
46111 74.95000000
46117 49.95000000
46118 59.95000000
46462 74.95000000
66569 39.95000000
71647 19.95000000
156908 49.95000000
167573 24.95000000
204749 54.95000000
246604 110.00000000
246605 99.95000000
247025 44.95000000
247140 39.95000000
247613 44.95000000
247846 39.95000000
253450 19.95000000
257455 49.95000000
257456 49.95000000
257457 49.95000000
263753 29.95000000