If your driving licence from the UK has expired and you permanently live in Spain then you will need to change it for a Spanish one. It is the photo-card part that will expire first because the photo needs to be updated every ten years. You will not be able to renew it in the UK with the DVLA even via the internet.
You will need to obtain a new licence from the Jefetura Provincial de Trafico. You will need to complete an application form which you submit with your original driving licence, both the photo-card and paper part to their offices plus a photocopy. Also, you must include two appropriate sized photographs (often available in photography shops, but remember to state they are for a new Spanish driving licence, because if they think it is for a new UK passport they will be a different size).
According to the UK Governement website, if the UK leaves the European Union without an agreement then UK driving licence holders will not be able to exchange their driving licences for a Spanish one.
After that date if you want a Spanish driving licence then you will have to pass the Spanish driving test. We recommend you exchange it before 31 December 2020.
The photos you submit should be signed on the back by a professional. You will need to take your residencia paper and a medical certificate which shows you are fit to drive. There is usually a medical centre near a Jefetura Provincial de Trafico that will be able to provide this certificate to you after a short eye-sight test and medical questionnaire. They will ask you to sign a declaration that you have not been banned from driving in your own country and that you are not the holder of any other driving licence.
It is possible for you to use a third party to undertake this application for you, for a fee. You will of course need to provide your documentation and undertake the medical. However, they will go to Trafico for you.
The process to change your driving licence to a Spanish driving licence can be found here.