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 (
    9019, 9020, 9021, 9022, 9023, 9024, 9035, 
    9036, 9037, 9038, 9039, 9040, 9041, 
    9042, 9043, 9044, 9045, 9061, 9062, 
    9063, 9064, 9065, 9066, 9067, 9068, 
    9069, 9070, 9086, 9088, 9124, 9125, 
    9126
  ) 
  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.00070

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "76.81"
    },
    "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": 32,
        "rows_produced_per_join": 6,
        "filtered": "19.99",
        "index_condition": "(`portal`.`q_product_prices`.`product_id` in (9019,9020,9021,9022,9023,9024,9035,9036,9037,9038,9039,9040,9041,9042,9043,9044,9045,9061,9062,9063,9064,9065,9066,9067,9068,9069,9070,9086,9088,9124,9125,9126))",
        "cost_info": {
          "read_cost": "75.53",
          "eval_cost": "1.28",
          "prefix_cost": "76.81",
          "data_read_per_join": "153"
        },
        "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
9019 189.000000
9020 229.000000
9021 209.000000
9022 229.000000
9023 209.000000
9024 209.000000
9035 179.000000
9036 179.000000
9037 179.000000
9038 119.000000
9039 129.000000
9040 129.000000
9041 349.000000
9042 349.000000
9043 239.000000
9044 239.000000
9045 149.000000
9061 159.000000
9062 169.000000
9063 209.000000
9064 209.000000
9065 209.000000
9066 209.000000
9067 209.000000
9068 209.000000
9069 209.000000
9070 209.000000
9086 99.000000
9088 129.000000
9124 128.990000
9125 209.000000
9126 148.000000