UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Muk3vPKsXbHPlzGUI6nZ+AUTUq8pgYG1YHujHYcoFCw='
WHERE
key_id = '85b5be0a331bd9c026f83a5ade641f2af58ca56a828a90005ec0f78b914983eb'
AND (
token = 'Muk3vPKsXbHPlzGUI6nZ+AUTUq8pgYG1YHujHYcoFCw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)