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 (
    381694, 381692, 381689, 381685, 381682, 
    381688, 381693, 381691, 381690, 381703, 
    381701, 381687, 381702, 381696, 381698, 
    381705, 381697, 381704
  ) 
  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.00167

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "50.46"
    },
    "grouping_operation": {
      "using_filesort": false,
      "table": {
        "table_name": "cscart_product_prices",
        "access_type": "range",
        "possible_keys": [
          "usergroup",
          "product_id",
          "lower_limit",
          "usergroup_id"
        ],
        "key": "usergroup",
        "used_key_parts": [
          "product_id",
          "usergroup_id",
          "lower_limit"
        ],
        "key_length": "9",
        "rows_examined_per_scan": 36,
        "rows_produced_per_join": 36,
        "filtered": "100.00",
        "cost_info": {
          "read_cost": "43.26",
          "eval_cost": "7.20",
          "prefix_cost": "50.46",
          "data_read_per_join": "2K"
        },
        "used_columns": [
          "product_id",
          "price",
          "percentage_discount",
          "lower_limit",
          "usergroup_id"
        ],
        "attached_condition": "((`webmarco`.`cscart_product_prices`.`lower_limit` = 1) and (`webmarco`.`cscart_product_prices`.`product_id` in (381694,381692,381689,381685,381682,381688,381693,381691,381690,381703,381701,381687,381702,381696,381698,381705,381697,381704)) and (`webmarco`.`cscart_product_prices`.`usergroup_id` in (0,1)))"
      }
    }
  }
}

Result

product_id price
381682 0.00000000
381685 0.00000000
381687 0.00000000
381688 0.00000000
381689 0.00000000
381690 0.00000000
381691 0.00000000
381692 0.00000000
381693 0.00000000
381694 0.00000000
381696 0.00000000
381697 0.00000000
381698 0.00000000
381701 0.00000000
381702 0.00000000
381703 0.00000000
381704 0.00000000
381705 0.00000000