You would need to use the IPN Script to update the order status.
this is a limitation to the way PayPAl standard works.
paypal standard is not a real time payment gateway. When the user is passed over to paypal to set up the payment, the transaction is placed in a queue, then the user is passed back to your site.
the transaction may be processed in moments, or it may take days for it to get through the queue. Once it does get through the queue and the status is known, paypal uses IPN to post the result to your site.