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 (
    5095, 3147, 5094, 5097, 7732, 1522, 1683, 
    1685, 2447, 3554, 3552, 3553, 7603, 
    7604, 7605, 7606, 4059, 3865, 4054, 
    4058, 4052, 4056, 4053, 3870, 3872, 
    3871, 3873, 3862, 5512, 5513, 5511, 
    5514, 5359, 2958, 7024, 5863, 5862, 
    6860, 6859, 6856, 6761, 4591, 5781, 
    5714, 7427, 4969, 2626, 2627
  ) 
  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.00125

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "34.06"
    },
    "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": 49,
        "rows_produced_per_join": 9,
        "filtered": "19.12",
        "index_condition": "(`dbggbern`.`cscart_product_prices`.`product_id` in (5095,3147,5094,5097,7732,1522,1683,1685,2447,3554,3552,3553,7603,7604,7605,7606,4059,3865,4054,4058,4052,4056,4053,3870,3872,3871,3873,3862,5512,5513,5511,5514,5359,2958,7024,5863,5862,6860,6859,6856,6761,4591,5781,5714,7427,4969,2626,2627))",
        "cost_info": {
          "read_cost": "33.12",
          "eval_cost": "0.94",
          "prefix_cost": "34.06",
          "data_read_per_join": "224"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`dbggbern`.`cscart_product_prices`.`lower_limit` = 1) and (`dbggbern`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
1522 19.90000000
1683 59.90000000
1685 59.90000000
2447 59.90000000
2626 39.90000000
2627 19.90000000
2958 29.90000000
3147 19.90000000
3552 14.90000000
3553 14.90000000
3554 14.90000000
3862 44.90000000
3865 39.90000000
3870 44.90000000
3871 44.90000000
3872 44.90000000
3873 44.90000000
4052 39.90000000
4053 39.90000000
4054 39.90000000
4056 39.90000000
4058 39.90000000
4059 39.90000000
4591 29.90000000
4969 49.90000000
5094 19.90000000
5095 19.90000000
5097 19.90000000
5359 29.90000000
5511 29.90000000
5512 29.90000000
5513 29.90000000
5514 29.90000000
5714 79.90000000
5781 29.90000000
5862 24.90000000
5863 24.90000000
6761 24.90000000
6856 24.90000000
6859 24.90000000
6860 24.90000000
7024 19.90000000
7427 39.90000000
7603 39.90000000
7604 39.90000000
7605 39.90000000
7606 39.90000000
7732 19.90000000