UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U256O7da2Btxg+RpSl8UPm+Hxi8iCBDlaLTOdGimHjM='
WHERE
key_id = '30c69f35e2783c265513ea431bc7c38f910cfaabf16cf8311b24e9fbc46634ed'
AND (
token = 'U256O7da2Btxg+RpSl8UPm+Hxi8iCBDlaLTOdGimHjM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)