After making a sandwich with mayo you can safely leave the mayo sandwich out at room temperature of 2 hours before it starts to go bad.
If you leave the sandwich out with the mayo on it longer than 2 hours then the bacteria can begin to grow rapidly and then cause spoilage of the sandwich.
When that happens the mayo will start to smell bad and it could make you sick.
If you want to keep a sandwich out with mayo you should place it in a cooler with some ice or ice packs to help keep it cool.
That way the cooler will help keep the mayo sandwich cool enough to where bacteria cannot grow on the sandwich.