SELECT 
  product_prices.product_id, 
  MIN(
    IF(
      product_prices.percentage_discount = 0, 
      product_prices.price, 
      product_prices.price - (
        product_prices.price * product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  product_prices 
WHERE 
  product_prices.product_id IN (
    130681, 145323, 114897, 131992, 165403, 
    257589, 115093, 108241, 197488, 175093, 
    165284, 156319, 202170, 167561, 108245, 
    139394, 159546, 156799, 211705, 252518, 
    108234, 164905, 108385, 112103, 129512, 
    161993, 112102, 129527, 144425, 131847, 
    108248, 120905, 108242, 242304, 111949, 
    196622, 111951, 133995, 128503, 131987, 
    156326, 114827, 132626, 135126, 138125, 
    161899, 114282, 174366
  ) 
  AND product_prices.lower_limit = 1 
  AND product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  product_prices.product_id

Query time 0.00604

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "40.68"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "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": 48,
        "rows_produced_per_join": 4,
        "filtered": "10.00",
        "index_condition": "(`goimagine`.`product_prices`.`product_id` in (130681,145323,114897,131992,165403,257589,115093,108241,197488,175093,165284,156319,202170,167561,108245,139394,159546,156799,211705,252518,108234,164905,108385,112103,129512,161993,112102,129527,144425,131847,108248,120905,108242,242304,111949,196622,111951,133995,128503,131987,156326,114827,132626,135126,138125,161899,114282,174366))",
        "cost_info": {
          "read_cost": "40.20",
          "eval_cost": "0.48",
          "prefix_cost": "40.68",
          "data_read_per_join": "115"
        },
        "used_columns": [
          "id",
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`goimagine`.`product_prices`.`lower_limit` = 1) and (`goimagine`.`product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
108234 15.00000000
108241 6.00000000
108242 5.00000000
108245 10.00000000
108248 10.00000000
108385 8.00000000
111949 15.00000000
111951 15.00000000
112102 10.00000000
112103 15.00000000
114282 8.00000000
114827 15.00000000
114897 20.00000000
115093 6.00000000
120905 20.00000000
128503 20.00000000
129512 20.00000000
129527 6.00000000
130681 10.00000000
131847 8.00000000
131987 8.00000000
131992 25.00000000
132626 8.00000000
133995 3.00000000
135126 6.00000000
138125 20.00000000
139394 15.00000000
144425 8.00000000
145323 10.00000000
156319 10.00000000
156326 8.00000000
156799 10.00000000
159546 10.00000000
161899 15.00000000
161993 15.00000000
164905 12.00000000
165284 25.00000000
165403 40.00000000
167561 9.00000000
174366 7.00000000
175093 15.00000000
196622 10.00000000
197488 10.00000000
202170 6.00000000
211705 15.00000000
242304 10.00000000
252518 20.00000000
257589 20.00000000