IMHO, Luffy will never get a chance to return the Hat to Shanks.
He told Makino as a child that he'll pay her back with his Treasure and his Treasure, as he himself said, was the Strawhat.
The way I see it, he will give his Hat to Shanks' & Makino's Kid thereby fulfilling both the promises in a poetic way and Shanks would die.