Assuming you are non resident in Spain, a 3% retention will be withheld at the notary when you sign, so if you sell for €90k, that means €2700 will be withheld. This is in lieu of any potential capital gains tax (CGT) resulting in the sale. This would be due on any difference between the (declared) purchase price and the sale price.
But you can deduct the original purchase costs such as iva/transmission tax (7%) and notary fees etc. It is not entirely clear from your post whether you declared the full purchase price, or if the "cash" portion was in fact "black", but assuming it was not and you declared €80k at the time of purchase, your costs would have been €5,600 tax (7%) plus notary, land registry and lawyer fees. If the sale price includes an agent's fee, this can also be deducted (if you have a vat receipt for it!), so the chances are the 3% will adequately cover your liability.
If it is too much, you can claim back the difference.
If not, you will be liable to pay the outstanding amount of CGT, which is calculated at 18% of your gain (after deductable costs).
You will probably also have to pay a fee to cancel your mortgage.
Within 30 days of the sale, you should also pay any Plus Valia due. This is a local town hall tax on the increase in the rateable value (valor catastral) during your ownership. Unless you have owned the property for a long time, this is unlikely to amount to very much.
Hope this helps.