Short answer: No.
There are ways to accomplish row locking, but they only last so long as the connection to the DB is maintained. So you couldn't maintain a connection very well from PHP. You'd have to do it from, say, a command line window where you never closed the window.
A better way to do this is probably to use a VIEW or STORED PROCEDURE. (Besides, DB purists will urge you to do *ALL* web-based work on the DB via one of those and *NEVER* make ad hoc SQL queries!)
Your VIEW or PROC simply provides a default record if no record is found.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.