UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zi+CCNs0kpSWoZMsG7YGg/iqWnSf2rvTYFXy9r2EMho='
WHERE
key_id = 'ad0dca9983661194b4d8d7115e39ce07255ca5dcc3b2f878de9dbb7edc6d663d'
AND (
token = 'zi+CCNs0kpSWoZMsG7YGg/iqWnSf2rvTYFXy9r2EMho='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)