Governments at Holyrood and Westminster have been challenged to “stand by” workers at Scotland’s only oil refinery as it prepares to close.