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 (
    2913, 2914, 2915, 2916, 2917, 2918, 2919, 
    2920, 2921, 2881, 2882, 2883, 2884, 
    2885, 2886, 2887, 2888, 2889, 2890, 
    2891, 2892, 2858, 2859, 2860, 2861, 
    2862, 2863, 2864, 2865, 2866
  ) 
  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.00289

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 (2913,2914,2915,2916,2917,2918,2919,2920,2921,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2891,2892,2858,2859,2860,2861,2862,2863,2864,2865,2866))",
        "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
2858 666.000000
2859 666.000000
2860 666.000000
2861 666.000000
2862 666.000000
2863 209.000000
2864 145.000000
2865 209.000000
2866 259.000000
2881 599.000000
2882 955.000000
2883 135.000000
2884 315.000000
2885 425.000000
2886 239.000000
2887 235.000000
2888 55.000000
2889 59.000000
2890 39.000000
2891 75.000000
2892 45.000000
2913 519.000000
2914 639.000000
2915 485.000000
2916 489.000000
2917 509.000000
2918 479.000000
2919 479.000000
2920 539.000000
2921 569.000000