What I'd do!!!
1. Clean it like Brian does at http://reviews.cnet.com/4520-11319_7-6240575-1.html
2. If it still fails, consider a new 21 dollar DVDRW drives such as
http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&Description=dvdrw&bop=And&Order=PRICE
I have a Compaq Presario with a Celeron CPU 2.53 GHz and 504 MB of Ram. I use Windows XP Home Edition Version 2002 Service Pack 3. I know its a old machine but does what I need it to do. My computer has done this for a long time but I'm getting sick of having to restart the system to access CD drive. When system initially boots up the CD drive will open and close just fine but sometime later (not sure exactly how much later, (hours of 1-2 days) the door won't open by pushing button or sticking pin in small hole. If I go to My computer it doesn't even show the CD drive. What could be causing this? Thanks in advance.
PS When the door does open, My Computer does recognize the drive

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic