My prefered route used to be the overnight train to Lvov then spend the Next day there.
On 2nd day go in the morning to the bus station and take the bus to Pzemysl in Poland, about 30gr and its just over the border, you can spean a pleasant afternoon there then take the bus back to Lvov at night, you can either then take the 22.50 train back to Kiev or stay the night in Lvov, whatever your preference takes.
Anyone who has done that crossing will confirm its quite an experience, the buses are full of smugglers