UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uTEKPx+pUIrI0ZFcA/ztKv5Q7ReJRU5DJ9mDmSEiw0A='
WHERE
key_id = 'ae312b7b851ec3eb0a9387cf22dc48d08a370d7a8cd663e67d7169c5b477fbf9'
AND (
token = 'uTEKPx+pUIrI0ZFcA/ztKv5Q7ReJRU5DJ9mDmSEiw0A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)