Update on the lockers in Cordoba: you are no longer permitted to store your luggage yourself. You must approach the guard at the kiosk who checks your ticket. He will put your bag in a locker and give you a slip with the locker number and a notation of the date and your estimated time of return. (Cost, 3 euros.) When you present your slip, the guard will get your bags.
Note: have the fellow at the kiosk get your luggage well before your train is due. I saw a couple of American students miss their train because they walked up to the kiosk at the last minute with their tickets and luggage slips during a peak hour. Their AVE took off without them, much to their disgust.