SELECT 
  q_product_prices.product_id, 
  MIN(
    IF(
      q_product_prices.percentage_discount = 0, 
      q_product_prices.price, 
      q_product_prices.price - (
        q_product_prices.price * q_product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  q_product_prices 
WHERE 
  q_product_prices.product_id IN (
    533, 534, 535, 536, 537, 538, 539, 540, 
    541, 542, 543, 544, 545, 546, 547, 548, 
    549, 500, 501, 502, 503, 504, 505, 506, 
    507, 508, 509, 510, 511, 512
  ) 
  AND q_product_prices.lower_limit = 1 
  AND q_product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  q_product_prices.product_id

Query time 0.00077

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "72.01"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "q_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": 5,
        "filtered": "19.99",
        "index_condition": "(`portal`.`q_product_prices`.`product_id` in (533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,500,501,502,503,504,505,506,507,508,509,510,511,512))",
        "cost_info": {
          "read_cost": "70.81",
          "eval_cost": "1.20",
          "prefix_cost": "72.01",
          "data_read_per_join": "143"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`portal`.`q_product_prices`.`lower_limit` = 1) and (`portal`.`q_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
500 309.000000
501 325.000000
502 415.000000
503 319.000000
504 319.000000
505 299.000000
506 299.000000
507 335.000000
508 315.000000
509 315.000000
510 109.000000
511 135.000000
512 115.000000
533 209.000000
534 159.000000
535 155.000000
536 199.000000
537 199.000000
538 205.000000
539 175.000000
540 195.000000
541 329.000000
542 385.000000
543 185.000000
544 179.000000
545 169.000000
546 225.000000
547 179.000000
548 275.000000
549 156.000000