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 (
    8982, 8983, 8986, 8987, 8991, 8992, 8993, 
    8994, 8995, 8996, 8997, 8998, 8999, 
    9000, 9001, 9002, 9003, 9004, 9005, 
    9006, 9007, 9008, 9009, 9010, 9011, 
    9012, 9013, 9014, 9015, 9016, 9017, 
    9018
  ) 
  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.00084

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 (8982,8983,8986,8987,8991,8992,8993,8994,8995,8996,8997,8998,8999,9000,9001,9002,9003,9004,9005,9006,9007,9008,9009,9010,9011,9012,9013,9014,9015,9016,9017,9018))",
        "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
8982 219.000000
8983 119.000000
8986 89.000000
8987 249.000000
8991 125.000000
8992 149.000000
8993 149.000000
8994 189.000000
8995 229.000000
8996 189.000000
8997 209.000000
8998 239.000000
8999 189.000000
9000 209.000000
9001 125.000000
9002 105.000000
9003 125.000000
9004 139.000000
9005 125.000000
9006 139.000000
9007 105.000000
9008 125.000000
9009 139.000000
9010 125.000000
9011 149.000000
9012 189.000000
9013 149.000000
9014 189.000000
9015 149.000000
9016 149.000000
9017 159.000000
9018 149.000000