Super glue, small blob on your key, offer it back up to the lock, wait a few seconds and hey presto
You have glued the lock solid
Depends what type of lock, if you can remove lock it can be opened to remove key.
You may be able to turn the lock with a flat blade screwdriver to enable to remove if this type?
http://www.discountlocks.co.uk/PhotoDetails.asp?ShowDESC=N&ProductCode=Iseo-I094545N
with the key in a vertical position drill the top about 5mm in from the end with a 3mm bit, just deep enough to access the top of the stuck key and flick it out with a sharp point.Then drive in a screw of suitable diameter just to the depth drilled, cut off top of screw and file down flush.If nothing goes wrong you will still have a working lock, if not replace with new.