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 (
    4109, 4032, 4033, 4034, 4035, 4036, 4164, 
    4161, 4162, 4175, 4176, 4177, 4178, 
    4179, 4180, 4181, 4182, 4183, 4184, 
    4185, 4186, 4187, 4188, 4192, 4193, 
    4194, 4195, 4199, 4200, 4201, 4202, 
    4367, 4020, 4021, 4022, 4023, 3934, 
    3932, 3970, 4024, 4014, 4065, 4113, 
    4086, 4089, 4092, 4093, 4097, 4018, 
    4028, 3929, 4052, 4010, 3955, 4150, 
    4151, 4050, 3930, 4189, 4037, 4038, 
    4039, 4040, 4025, 4119, 4126, 4127, 
    4072, 4145, 4146, 4147, 4060, 3974, 
    4041, 4103, 4148, 4102, 4366, 4064, 
    4062, 4101, 4063, 4074, 4075, 4076, 
    4077, 4078, 4079, 4080
  ) 
  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.02073

JSON explain

{
  "query_block": {
    "select_id": 1,
    "filesort": {
      "sort_key": "cscart_product_prices.product_id",
      "temporary_table": {
        "table": {
          "table_name": "cscart_product_prices",
          "access_type": "ref",
          "possible_keys": [
            "usergroup",
            "product_id",
            "lower_limit",
            "usergroup_id"
          ],
          "key": "lower_limit",
          "key_length": "3",
          "used_key_parts": ["lower_limit"],
          "ref": ["const"],
          "rows": 6449,
          "filtered": 37.89348602,
          "attached_condition": "cscart_product_prices.lower_limit <=> 1 and cscart_product_prices.product_id in (4109,4032,4033,4034,4035,4036,4164,4161,4162,4175,4176,4177,4178,4179,4180,4181,4182,4183,4184,4185,4186,4187,4188,4192,4193,4194,4195,4199,4200,4201,4202,4367,4020,4021,4022,4023,3934,3932,3970,4024,4014,4065,4113,4086,4089,4092,4093,4097,4018,4028,3929,4052,4010,3955,4150,4151,4050,3930,4189,4037,4038,4039,4040,4025,4119,4126,4127,4072,4145,4146,4147,4060,3974,4041,4103,4148,4102,4366,4064,4062,4101,4063,4074,4075,4076,4077,4078,4079,4080) and cscart_product_prices.usergroup_id in (0,1)"
        }
      }
    }
  }
}

Result

product_id price
3929 431.46000000
3930 495.72000000
3932 86.70000000
3934 86.70000000
3955 70.38000000
3970 68.34000000
3974 162.18000000
4010 1524.90000000
4014 192.78000000
4018 192.78000000
4020 202.98000000
4021 182.58000000
4022 122.40000000
4023 202.98000000
4024 561.00000000
4025 137.70000000
4028 449.82000000
4032 830.28000000
4033 830.28000000
4034 830.28000000
4035 830.28000000
4036 830.28000000
4037 430.44000000
4038 430.44000000
4039 430.44000000
4040 430.44000000
4041 1709.52000000
4050 648.72000000
4052 330.48000000
4060 646.68000000
4062 939.42000000
4063 789.48000000
4064 1034.28000000
4065 118.32000000
4072 118.32000000
4074 270.30000000
4075 270.30000000
4076 270.30000000
4077 270.30000000
4078 270.30000000
4079 270.30000000
4080 270.30000000
4086 180.54000000
4089 338.64000000
4092 433.50000000
4093 178.50000000
4097 159.12000000
4101 1573.86000000
4102 1089.36000000
4103 779.28000000
4109 174.42000000
4113 330.48000000
4119 302.94000000
4126 329.46000000
4127 329.46000000
4145 286.62000000
4146 191.76000000
4147 143.82000000
4148 835.38000000
4150 596.70000000
4151 596.70000000
4161 596.70000000
4162 1550.40000000
4164 459.00000000
4175 459.00000000
4176 435.54000000
4177 327.42000000
4178 826.20000000
4179 1412.70000000
4180 587.52000000
4181 979.20000000
4182 760.92000000
4183 912.90000000
4184 1087.32000000
4185 1195.44000000
4186 2064.48000000
4187 364.14000000
4188 1331.10000000
4189 488.58000000
4192 387.60000000
4193 341.70000000
4194 514.08000000
4195 514.08000000
4199 716.04000000
4200 358.02000000
4201 430.44000000
4202 283.56000000
4366 1034.28000000
4367 1087.32000000