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 (
    1593, 1594, 1595, 1596, 1597, 1598, 1599, 
    1600, 1601, 1602, 1603, 1605, 1606, 
    1607, 1610, 1611, 1612, 1613, 1614, 
    1615, 1616, 1617, 1618, 1624, 1625, 
    1626, 1627, 1628
  ) 
  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.00096

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "67.21"
    },
    "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": 28,
        "rows_produced_per_join": 5,
        "filtered": "19.99",
        "index_condition": "(`portal`.`q_product_prices`.`product_id` in (1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1605,1606,1607,1610,1611,1612,1613,1614,1615,1616,1617,1618,1624,1625,1626,1627,1628))",
        "cost_info": {
          "read_cost": "66.09",
          "eval_cost": "1.12",
          "prefix_cost": "67.21",
          "data_read_per_join": "134"
        },
        "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
1593 25.000000
1594 25.000000
1595 25.000000
1596 20.000000
1597 20.000000
1598 20.000000
1599 29.000000
1600 29.000000
1601 29.000000
1602 29.000000
1603 12.000000
1605 12.000000
1606 12.000000
1607 12.000000
1610 15.000000
1611 15.000000
1612 15.000000
1613 15.000000
1614 15.000000
1615 15.000000
1616 15.000000
1617 15.000000
1618 15.000000
1624 10.000000
1625 10.000000
1626 10.000000
1627 10.000000
1628 10.000000