Something like that, you can take a look at finite state machines. But i am thinking it should be too hard. Something like a close/open door state and when in a open door state just slowly open door/slide wall.
public GameObject myDoor;
public bool open = false;
void OnMouseUp() // Called when the player clicks and released on the button
{
if( !open ) StartCoroutine( "OpenDoor" );
else StartCoroutine( "CloseDoor" );
}
opening your door could be something like this
The code abobe should give you some ideas, also it may be worth creating the door and button effect as an animation.
I did this with a small turn style door and it worked really well. Create the animation of the door opening. Then just play the animation backwards to close the door.