I bought a train ticket from Chop to L'viv online. So I've printed out the receipt (БЛАНК ЗАМОВЛЕННЯ). It says on it, that I will need to swap it for the actual ticket at some pay desk (каса) on Ukrainian soil. The problem is that my train is at 11pm and I arrive from Hungary. Will there be an open каса at this time or some automatic machine to print out my ticket, or is there some other solution?
Yes, there will be. Generally Ukrainian train stations are open and have trains running 24/7, and every large train station in Ukraine has at least one Kassa open during 24/7 period.
Chop is one of the largest, and on the border. Thus they also must have some windows staffed by English speakers, but at 11pm they might not be there. Thus don't expect English to be spoken or understood, and please print the following on a piece of paper and give with your receipt:
Будь ласка, обміняйте мій бланк замовлення на залізничний квиток. Я не розмовляю українскою.
("please exchange my receipt for the train ticket. I do not speak Ukrainian")