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 (
    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
  ) 
  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.00094

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": "20.00",
        "index_condition": "(`gaseus`.`cscart_product_prices`.`product_id` in (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))",
        "cost_info": {
          "read_cost": "33.08",
          "eval_cost": "0.98",
          "prefix_cost": "34.06",
          "data_read_per_join": "235"
        },
        "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
304 0.00000000
305 0.00000000
306 0.00000000
307 0.00000000
308 0.00000000
309 0.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