Turn seconds into minutes and seconds MM:SS

I have this code with a timer on, this timer is displayed on one of my scenes. Now it is working as supposed, there is just a little thing, the timer is only showing in seconds. How would i modify my code, so that it is showing both minutes and seconds like MM:SS, while the rest of the code is still working?

static var energy : int = 5;

var timer : float;

function Start()
{
timer = 1800;
}

function Update () {
 
  timer -= Time.deltaTime;
     if(counter <= 0){
        energy += 1;
        counter = 1800;
        Debug.Log("You Have " + energy + " Energy"); 
}

function OnGUI () {

	GUI.Label(new Rect(100,20,400,40),"To Next: " + timer);
}

There’s a million of these, just Search/Google

unity convert seconds to minutes