UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9XzPoKWlsCJWnNI7WnEnjqdfOizoKh3B8TxYXgGhVoU='
WHERE
key_id = 'f79672b188f451937a36fefc3f7e9e4bef925ed86340806ca98b4b717871ad1e'
AND (
token = '9XzPoKWlsCJWnNI7WnEnjqdfOizoKh3B8TxYXgGhVoU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)