Hi aksul,
welcome to the Apple (user-to-user) Community!
Re: Macbook Trade-in in Madrid
We are all Apple users, like yourself, in the community, so if you do not get the answer you seek:
There are contact details for stores in Madrid online, if you want to check directly with staff:
See: Apple Store - Find a Store - Apple
The Trade-in website also has useful info / FAQ's at the bottom : Apple Trade In - Apple
___________________________________________________________________________________
Re: " .... trading in my MacBook Air for a new one at the Apple Store in Madrid
Do I need to be a resident or citizen of Spain to do so? "
You may need to enquire from store staff beforehand to be sure of eligibilty requirements in Spain.
Eg: If you buy a Mac in Spain, and take it to another country there may be issues with features like your Apple ID account / payment methods / app purchases / warranty / Apple Care / and etc.
You can view what is needed to: Change your Apple ID country or region - Apple Support
____________________________________________________________________________________
Re: if I bring my MacBook to the store for the trade-in rather than doing it online, how long will the process take?
You can make a shopping reservation, and let them know your Mac needs, which could help:
Seems a Specialist will evaluate your device on the spot
Time in store may depend on whether you prepare your Mac before-hand, or do all in store:
Eg: What to do before you sell, give away, trade in, or recycle your Mac - Apple Support
All the best :-)