UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6cYS4n9DJPz2PFM3FtLRm+LUPvCjPVU+PNY+KTuw4pg='
WHERE
key_id = '9af24c86ab08ec28db71b8e8814ad56fcedf20f0ee8860ddbf944f89f5ee064f'
AND (
token = '6cYS4n9DJPz2PFM3FtLRm+LUPvCjPVU+PNY+KTuw4pg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)