The way I would do it is to create two more columns in your cart:
DiscountedPrice
DiscountThreshold
Then you can add a calculation to the cart for:
UsePrice = ([Quantity] >= [DiscountThreshold])?[DiscountedPrice]:[Price]
And update the existing TotalPrice column from: [Price} * [Quantity]
To:
[UsePrice] * [Quantity]
Finally update the cart to display the UsePrice column instead of the Price column wherever it is displayed and update your payment gateway code to do the same when processing payments.