UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yt447aQxIavMNhMTxGVUiNQERjcaHO3a8iOgucgD/6w='
WHERE
key_id = '25b842808628c6071d771266842b698546b7ee2b2ec627e9bd894ac54a5958fa'
AND (
token = 'yt447aQxIavMNhMTxGVUiNQERjcaHO3a8iOgucgD/6w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)