UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mcvdK/B5AjXrzzvM+Fh284xZpRegLWnO8K3GHgmYskk='
WHERE
key_id = '530f05d784dfed09990a7248133c04b179065bbf49ae8208eaf5b648971e7310'
AND (
token = 'mcvdK/B5AjXrzzvM+Fh284xZpRegLWnO8K3GHgmYskk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)