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 (
    17, 
    148, 
    180, 
    187, 
    232, 
    230, 
    231, 
    18, 
    16, 
    4, 
    5, 
    23, 
    24, 
    170, 
    1, 
    22, 
    149, 
    227, 
    78, 
    79, 
    190, 
    189, 
    162, 
    159, 
    158, 
    245, 
    238, 
    239, 
    242, 
    243, 
    241, 
    240, 
    214, 
    217, 
    218, 
    207, 
    59, 
    58, 
    60, 
    199, 
    198, 
    94, 
    96, 
    201, 
    114, 
    192, 
    136, 
    130, 
    128, 
    126, 
    131, 
    177, 
    186, 
    185, 
    179, 
    11, 
    172, 
    134, 
    135, 
    195, 
    233, 
    168, 
    167, 
    169, 
    42, 
    39, 
    40, 
    205, 
    37, 
    152, 
    160, 
    74, 
    73, 
    71, 
    75, 
    72, 
    108, 
    237, 
    191, 
    235, 
    70, 
    122, 
    115, 
    156, 
    90, 
    175, 
    196, 
    43, 
    104, 
    76, 
    129, 
    127, 
    121, 
    103, 
    95, 
    182, 
    41, 
    56, 
    57, 
    30, 
    112, 
    246, 
    89, 
    197, 
    208, 
    173, 
    97, 
    229, 
    211, 
    210, 
    209, 
    67, 
    25, 
    116, 
    213, 
    215, 
    226, 
    200, 
    154, 
    53, 
    52, 
    111, 
    82, 
    84, 
    228, 
    85, 
    88, 
    26
  ) 
  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.00397

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "60.20"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "cscart_product_prices",
        "access_type": "ref",
        "possible_keys": [
          "usergroup",
          "product_id",
          "lower_limit",
          "usergroup_id"
        ],
        "key": "lower_limit",
        "used_key_parts": [
          "lower_limit"
        ],
        "key_length": "3",
        "ref": [
          "const"
        ],
        "rows_examined_per_scan": 256,
        "rows_produced_per_join": 25,
        "filtered": "10.00",
        "index_condition": "((`twebezli_Commercemodalpopup`.`cscart_product_prices`.`lower_limit` <=> 1) and ((`twebezli_Commercemodalpopup`.`cscart_product_prices`.`product_id` in (17,148,180,187,232,230,231,18,16,4,5,23,24,170,1,22,149,227,78,79,190,189,162,159,158,245,238,239,242,243,241,240,214,217,218,207,59,58,60,199,198,94,96,201,114,192,136,130,128,126,131,177,186,185,179,11,172,134,135,195,233,168,167,169,42,39,40,205,37,152,160,74,73,71,75,72,108,237,191,235,70,122,115,156,90,175,196,43,104,76,129,127,121,103,95,182,41,56,57,30,112,246,89,197,208,173,97,229,211,210,209,67,25,116,213,215,226,200,154,53,52,111,82,84,228,85,88,26)) and (`twebezli_Commercemodalpopup`.`cscart_product_prices`.`usergroup_id` in (0,1))))",
        "cost_info": {
          "read_cost": "9.00",
          "eval_cost": "5.12",
          "prefix_cost": "60.20",
          "data_read_per_join": "614"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ]
      }
    }
  }
}

Result

product_id price
1 5400.00000000
4 699.99000000
5 899.99000000
11 30.00000000
16 349.99000000
17 11.16000000
18 299.99000000
22 799.99000000
23 599.99000000
24 449.99000000
25 599.99000000
26 34.99000000
30 349.95000000
37 159.95000000
39 419.00000000
40 229.00000000
41 35.00000000
42 79.00000000
43 369.00000000
52 139.99000000
53 38.99000000
56 220.00000000
57 309.00000000
58 779.00000000
59 599.00000000
60 1499.00000000
67 339.99000000
70 499.99000000
71 529.99000000
72 599.99000000
73 589.99000000
74 524.99000000
75 489.99000000
76 439.99000000
78 100.00000000
79 96.00000000
82 19.99000000
84 19.99000000
85 19.99000000
88 39.99000000
89 19.99000000
90 19.99000000
94 59.99000000
95 19.99000000
96 99.99000000
97 14.99000000
103 23.99000000
104 29.95000000
108 12.99000000
111 6.99000000
112 8.99000000
114 14.99000000
115 4595.00000000
116 6.99000000
121 17.99000000
122 5695.00000000
126 129.99000000
127 4779.00000000
128 17.99000000
129 1799.00000000
130 49.95000000
131 1249.00000000
134 89.99000000
135 0.00000000
136 0.00000000
148 130.00000000
149 53.99000000
152 700.00000000
154 399.99000000
156 299.00000000
158 4750.00000000
159 11375.00000000
160 200.00000000
162 32750.00000000
167 549.95000000
168 1.00000000
169 749.95000000
170 145.99000000
172 299.99000000
173 349.99000000
175 179.99000000
177 400.00000000
179 299.97000000
180 199.99000000
182 6.80000000
185 139.99000000
186 299.99000000
187 299.99000000
189 1.00000000
190 899.95000000
191 11.98000000
192 15.00000000
195 29.99000000
196 17.00000000
197 14.98000000
198 17.99000000
199 29.98000000
200 26.92000000
201 12.67000000
205 149.99000000
207 42.00000000
208 82.94000000
209 109.99000000
210 89.99000000
211 299.99000000
213 295.00000000
214 972.00000000
215 1095.00000000
217 610.99000000
218 459.99000000
226 269.99000000
227 699.00000000
228 349.99000000
229 299.99000000
230 125.00000000
231 99.00000000
232 79.95000000
233 47.99000000
235 79.99000000
237 299.99000000
238 499.99000000
239 509.99000000
240 499.00000000
241 499.00000000
242 249.00000000
243 249.00000000
245 699.00000000
246 399.99000000