UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zOXZENaX9btw9zMKLYNZa5/KGZZDMWCXJhk+AQ4gpcQ='
WHERE
key_id = 'cb6e5d5a73bc914437df4a465ff14af46f4c526a99cacc82a8adaf61fe8c527d'
AND (
token = 'zOXZENaX9btw9zMKLYNZa5/KGZZDMWCXJhk+AQ4gpcQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)