A new ebook vending machine was on display at the Tokyo Ebook Fair last week. Japan is a country known for selling almost anything in vending machines (you should see the model that dispenses other vending machines), so it should come as no surprise to see one for ebooks.
A Japanese company called Glory had their prototype on display. From what details I can glean, you select and pay for the ebook on screen. The machine will print a receipt with a QR code and other info you'll need to download the ebook.
The system is geared towards smartphones, which makes sense. There aren't any ebook readers that can support downloading 3rd party DRMed ebooks in this manner.
There's no word on when the system will be available or if it will make it out of Japan.