Your quest timer will be halved – that is, set to its original default – since the cookie’s effect will have expired. If over half the doubled time in your quest has passed when the timer is reverted back to its original time, the quest will be considered failed.
For example: If you have the Double Quest Time Fortune Cookie active and Jhudora gives you a quest you must complete in 33 minutes, if your cookie's effect ends before you finish the quest, then the time will drop down to 16 minutes. If you didn’t complete the quest within the first half of your time – ie. the first 16 minutes – you will fail the quest when the timer goes down!