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 (
    13593, 13601, 14240, 14241, 14242, 14243, 
    14244, 14245, 14246, 14247, 14248, 
    14249, 14250, 14251, 14252, 14253, 
    14254, 14255, 14256, 14257, 14258, 
    14259, 14260, 14261, 14263, 14264, 
    14265, 14266, 14267, 14268, 14269, 
    14270
  ) 
  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.00094

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 (13593,13601,14240,14241,14242,14243,14244,14245,14246,14247,14248,14249,14250,14251,14252,14253,14254,14255,14256,14257,14258,14259,14260,14261,14263,14264,14265,14266,14267,14268,14269,14270))",
        "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
13593 81.000000
13601 86.000000
14240 94.000000
14241 94.000000
14242 94.000000
14243 94.000000
14244 94.000000
14245 94.000000
14246 94.000000
14247 94.000000
14248 94.000000
14249 94.000000
14250 94.000000
14251 94.000000
14252 94.000000
14253 94.000000
14254 76.000000
14255 76.000000
14256 76.000000
14257 76.000000
14258 76.000000
14259 76.000000
14260 76.000000
14261 76.000000
14263 76.000000
14264 76.000000
14265 76.000000
14266 76.000000
14267 76.000000
14268 76.000000
14269 76.000000
14270 76.000000