Coinless or TITO (ticket-in ticket-out) machines, as they're known, all issue tickets with expiration dates, although the length of their validity varies from property to property. Thirty days is the minimum, while 60 days is more common. Occasionally, you might come across a ticket that's valid for 90 days, but that's unusual.
In reality, the stated expiration date is somewhat moot. Most casinos are happy to cash an expired ticket, pretty much regardless of how old it is, although the further past its expiration date and/or the higher the amount, the farther up the personnel chain they'll need to go to honor it. If you have a ticket that's old, it won't be accepted by a machine, but take it to the cage and if the cashier can't approve it immediately, she'll call a supervisor who will.
Unlike winning race and sports tickets, most slot receipts must be presented in person, although some casinos will accept TITO vouchers mailed in (it's recommended you keep a photocopy of it and mail it by certified or registered mail -- your call, depending on the value of the ticket).
To be on the safe side, always remember to cash any winning ticket before you leave the premises. If you forget, the next time you're here, talk nicely to the cashier and you'll probably have no trouble getting your money.