Instantiating an object only once within Update()

This is what i have so far. if i collect some coins they get stored in the GameBrain script. when i make it to a chest i can store the coins in there and that value gets stored in the GameBrain at coinsStored. i have that all working fine i even had the object instantiating after i stored 10 coins. its when i tried to make it happen only once by adding the if(UnlockComplete = false)statement. (i know there is nested loops i have fixed that but still no change.) that i have issues with it not spawning at all.

public class UnlockFloor : MonoBehaviour {

public GameObject obj; 				//passed from unity
public float UnlockAmout = 10f; 		//usually set by unity 10 is default
private bool UnlockComplete = false;	//Stops a MillionBajillion "Things" from spawning

void OnDrawGizmosSelected() {			//A Gizmo so i can see the "Things" spawner
	Gizmos.color = new Color(1, 0, 0, 0.5F);
	Gizmos.DrawCube(transform.position, new Vector3(1, 1, 1));

void Update () {
	if(GameBrain.coinsStored > UnlockAmout) {
		if(UnlockComplete = false){
			UnlockComplete = true;
//Unlocks the "Thing" in question set by obj
void UnlockTheThing(){
	Instantiate(obj, transform.position, Quaternion.identity);


For googlers coming here in the future 1st of all greetings from the past. 2nd here is what went wrong

if(UnlockComplete = false){

should read

if(UnlockComplete == false){

= needs to be ==