UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XvBNl0NdAjV09UMb//nLnHDsbIBcTauivNmMw0AGFGA='
WHERE
key_id = 'dbf5f5493166439539608705ff0c26cea3716756574c9012b7fb43a960d99da1'
AND (
token = 'XvBNl0NdAjV09UMb//nLnHDsbIBcTauivNmMw0AGFGA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)