SELECT 
  cscart_product_prices.product_id, 
  MIN(
    IF(
      cscart_product_prices.percentage_discount = 0, 
      cscart_product_prices.price, 
      cscart_product_prices.price - (
        cscart_product_prices.price * cscart_product_prices.percentage_discount
      )/ 100
    )
  ) AS price 
FROM 
  cscart_product_prices 
WHERE 
  cscart_product_prices.product_id IN (
    3113, 6687, 6699, 36, 37, 38, 39, 40, 41, 
    42, 83, 84, 85, 86, 87, 88, 89, 147, 148, 
    149, 150, 151, 152, 153, 168, 169, 170, 
    171, 172, 173, 174, 250, 251, 252, 253, 
    254, 255, 256, 304, 305, 306, 307, 308, 
    309, 3532, 3533, 3534, 3535, 3536, 3537, 
    3538, 3947, 3948, 3949, 3950, 3951, 
    3952, 3953, 3992, 3993, 3994, 3995, 
    3996, 3997, 3998, 4052, 4053, 4054, 
    4055, 4056, 4057, 4058, 4135, 4136, 
    4137, 4138, 4139, 4140, 4141, 4188, 
    4189, 4190, 4191, 4192, 4193, 4194, 
    29, 30, 31, 32, 33, 34, 35, 76, 77, 78
  ) 
  AND cscart_product_prices.lower_limit = 1 
  AND cscart_product_prices.usergroup_id IN (0, 1) 
GROUP BY 
  cscart_product_prices.product_id

Query time 0.00158

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "67.66"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "cscart_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": 97,
        "rows_produced_per_join": 19,
        "filtered": "20.00",
        "index_condition": "(`gaseus`.`cscart_product_prices`.`product_id` in (3113,6687,6699,36,37,38,39,40,41,42,83,84,85,86,87,88,89,147,148,149,150,151,152,153,168,169,170,171,172,173,174,250,251,252,253,254,255,256,304,305,306,307,308,309,3532,3533,3534,3535,3536,3537,3538,3947,3948,3949,3950,3951,3952,3953,3992,3993,3994,3995,3996,3997,3998,4052,4053,4054,4055,4056,4057,4058,4135,4136,4137,4138,4139,4140,4141,4188,4189,4190,4191,4192,4193,4194,29,30,31,32,33,34,35,76,77,78))",
        "cost_info": {
          "read_cost": "65.72",
          "eval_cost": "1.94",
          "prefix_cost": "67.66",
          "data_read_per_join": "465"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`gaseus`.`cscart_product_prices`.`lower_limit` = 1) and (`gaseus`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
29 0.00000000
30 0.00000000
31 0.00000000
32 0.00000000
33 0.00000000
34 0.00000000
35 0.00000000
36 0.00000000
37 0.00000000
38 0.00000000
39 0.00000000
40 0.00000000
41 0.00000000
42 0.00000000
76 0.00000000
77 0.00000000
78 0.00000000
83 0.00000000
84 0.00000000
85 0.00000000
86 0.00000000
87 0.00000000
88 0.00000000
89 0.00000000
147 0.00000000
148 0.00000000
149 0.00000000
150 0.00000000
151 0.00000000
152 0.00000000
153 0.00000000
168 0.00000000
169 0.00000000
170 0.00000000
171 0.00000000
172 0.00000000
173 0.00000000
174 0.00000000
250 0.00000000
251 0.00000000
252 0.00000000
253 0.00000000
254 0.00000000
255 0.00000000
256 0.00000000
304 0.00000000
305 0.00000000
306 0.00000000
307 0.00000000
308 0.00000000
309 0.00000000
3113 287.00000000
3532 0.00000000
3533 0.00000000
3534 0.00000000
3535 0.00000000
3536 0.00000000
3537 0.00000000
3538 0.00000000
3947 0.00000000
3948 0.00000000
3949 0.00000000
3950 0.00000000
3951 0.00000000
3952 0.00000000
3953 0.00000000
3992 0.00000000
3993 0.00000000
3994 0.00000000
3995 0.00000000
3996 0.00000000
3997 0.00000000
3998 0.00000000
4052 0.00000000
4053 0.00000000
4054 0.00000000
4055 0.00000000
4056 0.00000000
4057 0.00000000
4058 0.00000000
4135 0.00000000
4136 0.00000000
4137 0.00000000
4138 0.00000000
4139 0.00000000
4140 0.00000000
4141 0.00000000
4188 0.00000000
4189 0.00000000
4190 0.00000000
4191 0.00000000
4192 0.00000000
4193 0.00000000
4194 0.00000000
6687 287.00000000
6699 302.00000000