UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OOlBtXb9nCbaB5mR/4MmZH5u/2ya8FLitOKJLVXsXWc='
WHERE
key_id = '4fdadbf8af5cb611247068b0cf7c164c388724042de598759e086474b68f2023'
AND (
token = 'OOlBtXb9nCbaB5mR/4MmZH5u/2ya8FLitOKJLVXsXWc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)