UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U+Bs5NP/ZjsNPeKezcLt2dpo4Q3tvuY0FtJPTppfj6o='
WHERE
key_id = '02fbf88521d5245a722cb5337e807dfc1e907cf1ed8cfc4992f9622943491cc0'
AND (
token = 'U+Bs5NP/ZjsNPeKezcLt2dpo4Q3tvuY0FtJPTppfj6o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)