Just for the record, I had the same problem today, although the other way around; I could lock the door and take my key out, but if I unlocked the door, I couldn't take the key out.
The resolution was the same; get a new euro cylinder. Having never dealt with locks on doors etc, I figured it...