Transform.translate player movement issue [JS]

So the problem is basicly that my player moves back to the middle lane instantly without a button being pressed which would make it do that. So when I make the player go left, it instantly goes back to the middle like the following video shows, why???

The script:

#pragma strict

var left = false;
var mid = false;
var right = false;

function FixedUpdate ()
{
    GetComponent.<Rigidbody>().AddForce (Vector3.down * 35);
    GetComponent.<Rigidbody>().AddForce (Vector3.forward * 5);
       
//   if (Input.GetKey (KeyCode.W))
//   {
//       GetComponent.<Rigidbody>().AddForce (Vector3.forward * 110);
//   }
   // if (Input.GetKey (KeyCode.S))
  //  {
   //     GetComponent.<Rigidbody>().AddForce (Vector3.back * 80);
  //  }
    if (Input.GetKey (KeyCode.A) && mid == true || right == true)
    {
        transform.Translate (Vector3.left * Time.deltaTime * 210);
    }
    if (Input.GetKey (KeyCode.D) && mid == true || left == true)
    {
        transform.Translate (Vector3.right * Time.deltaTime * 210);
    } 
    {
        GetComponent.<Rigidbody>().velocity = Vector3.ClampMagnitude(GetComponent.<Rigidbody>().velocity, maxVel);
    }  
   
}

var maxVel : float = 16.0;


function OnCollisionEnter (hit : Collision)
{
  if(hit.gameObject.name == "Left")
  {
      left = true;
      mid = false;
      right = false;
  }
  if(hit.gameObject.name == "Mid")
  {
      left = false;
      mid = true;
      right = false;
  }
  if(hit.gameObject.name == "Right")
  {
      left = false;
      mid = false;
      right = true;
  }
}

//function OnCollisionExit (hit : Collision)
//{
// if(hit.gameObject.name == "Floor")
// {
//     yield WaitForSeconds(0.15);
// }
//}

My guess:
Logical AND (&&) has a higher precedence than logical OR (||). (Operator precedence - JavaScript | MDN)
Try changing line 20 to:
if (Input.GetKey (KeyCode.A) && (mid == true || right == true))
and line 24 to:
if (Input.GetKey (KeyCode.D) && (mid == true || left == true))

Thanks a bunch that made it a lot better!

However, the script still jumps from the left all the way to the right and all the way from the right to the left instead of hitting the middle section first. It is like the ball hits the middle part so fast that it still think the button is being pressed and thereby jumps twice.
Any ideas?

Use GetKeyUp instead. GetKey will return true every frame its interacted with.

Hmm that worked, but also made it do the opposite - now it is very slow. I cant spam the keys, it needs at least 1 - 2 seconds between each function is called before it can register the next one