UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+gbovXaqN7i7XPRQ3yPfvMV09bXN5yLCyALOIojuGBE='
WHERE
key_id = 'a0caeae21d8051a5c63b2e7f0e301f01eb5c2b502e5c76490ce2d155edb81f3d'
AND (
token = '+gbovXaqN7i7XPRQ3yPfvMV09bXN5yLCyALOIojuGBE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)